File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
src/main/java/info/unterrainer/oauthtokenmanager Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1010
1111 <modelVersion >4.0.0</modelVersion >
1212 <artifactId >oauth-token-manager</artifactId >
13- <version >1.0.5 </version >
13+ <version >1.0.6 </version >
1414 <name >OauthTokenManager</name >
1515 <packaging >jar</packaging >
1616
Original file line number Diff line number Diff line change @@ -116,6 +116,9 @@ private TokenVerifier<AccessToken> persistUserInfoInContext(String authorization
116116 if (authorizationHeader == null || authorizationHeader .isBlank ())
117117 return null ;
118118
119+ if (authorizationHeader .toLowerCase ().startsWith ("bearer " ))
120+ authorizationHeader = authorizationHeader .substring (7 );
121+
119122 try {
120123 TokenVerifier <AccessToken > tokenVerifier = TokenVerifier .create (authorizationHeader , AccessToken .class );
121124 RemoteOauthToken remoteAccessToken = RemoteOauthToken .builder ()
@@ -127,8 +130,8 @@ private TokenVerifier<AccessToken> persistUserInfoInContext(String authorization
127130 }
128131 // Disabled to enable getting token from side-channels like 'localhost'.
129132 /*
130- * if (!token .getIssuer().equalsIgnoreCase(authUrl)) {
131- * setTokenRejectionReason(ctx, "Token has wrong real-url."); return null; }
133+ * if (!remoteAccessToken .getIssuer().equalsIgnoreCase(authUrl)) {
134+ * log.warn( "Token has wrong real-url."); return null; }
132135 */
133136 return tokenVerifier ;
134137
You can’t perform that action at this time.
0 commit comments