Skip to content

Commit 91a7113

Browse files
alternative check for different server settings: REDIRECT_HTTP_AUTHORIZATION
1 parent 59b5d41 commit 91a7113

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

public/class-jwt-auth-public.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ public function validate_token($output = true)
213213
* return the user.
214214
*/
215215
$auth = isset($_SERVER['HTTP_AUTHORIZATION']) ? $_SERVER['HTTP_AUTHORIZATION'] : false;
216+
217+
218+
/* Double check for different auth header string (server dependent) */
219+
if (!$auth) {
220+
$auth = isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']) ? $_SERVER['REDIRECT_HTTP_AUTHORIZATION'] : false;
221+
}
222+
216223
if (!$auth) {
217224
return new WP_Error(
218225
'jwt_auth_no_auth_header',

0 commit comments

Comments
 (0)