Skip to content

Commit

Permalink
Fixes #1642 [Core] Bearer authorization header is not recognized
Browse files Browse the repository at this point in the history
  • Loading branch information
ThuF committed Mar 4, 2022
1 parent 875264a commit 147896d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ private static String getJwtFromHeader(HttpServletRequest httpServletRequest) {
String authorizationHeader = httpServletRequest.getHeader(AUTHORIZATION_HEADER);
if (authorizationHeader != null) {
// Expected format Authorization header value: Bearer eyJhbGciOiJS...
if (authorizationHeader.startsWith(AUTHORIZATION_HEADER_VALUE_BEARER)) {
String tokenValue = authorizationHeader.replace(AUTHORIZATION_HEADER_VALUE_BEARER, "");
if (authorizationHeader.toLowerCase().startsWith(AUTHORIZATION_HEADER_VALUE_BEARER.toLowerCase())) {
String tokenValue = authorizationHeader.substring(AUTHORIZATION_HEADER_VALUE_BEARER.length());
if (isValidJwt(httpServletRequest, tokenValue)) {
jwt = tokenValue;
}
Expand Down

0 comments on commit 147896d

Please sign in to comment.