• Hello Developers,

    I started using this plugin for a site and was having trouble with getting the user from the authorization token. When looking through the validate_token method in jwt-authentication-for-wp-rest-api/public/class-jwt-auth-public.php, I noticed that the function only checks the global variables,, which does not seem to have all of the information pulled in from the request. However, if you add the following lines at line 237, it is able to get all of the headers from the request.

    
    if(!$auth) {
                $auth = isset(getallheaders()['Authorization']) ? getallheaders()['Authorization'] : false;
            }
    
    • This topic was modified 7 years, 7 months ago by Imagemdeck.

The topic ‘Authorization Header missing’ is closed to new replies.