LLMS_REST_Authentication::send_unauthorized_headers( WP_REST_Response $response )
Return a WWW-Authenticate header error message when incorrect creds are supplied
Parameters Parameters
- $response
-
(WP_REST_Response) (Required) Current response being served.
Return Return
(WP_REST_Response)
Source Source
File: libraries/lifterlms-rest/includes/class-llms-rest-authentication.php
*/ public function send_unauthorized_headers( $response ) { if ( is_wp_error( $this->get_error() ) ) { $auth_message = __( 'LifterLMS REST API', 'lifterlms' ); $response->header( 'WWW-Authenticate', 'Basic realm="' . $auth_message . '"', true ); } return $response;
Expand full source code Collapse full source code View on GitHub