Skip to content

Commit 9ff5c45

Browse files
authored
Added Bearer for the JWTValidateMiddleware
1 parent 4dd8301 commit 9ff5c45

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/JwtValidateMiddleware.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,15 @@ protected function parseAuthorizationHeader($header)
7474
return $decodedParts[1];
7575
}
7676

77+
if (strpos($header, "Bearer") === 0) {
78+
list($tokenString) = sscanf($header, "Bearer %s");
79+
80+
return base64_decode($tokenString);
81+
}
82+
7783
// Otherwise we expect the token to be specific directly (not encoded) with the "Token" label
7884
list($tokenString) = sscanf($header, "Token %s");
7985

8086
return $tokenString;
8187
}
82-
}
88+
}

0 commit comments

Comments
 (0)