Skip to content

Commit a56483e

Browse files
committed
加入头 Bearer or OAuth ,防止多个parser冲突
1 parent 1fc6eec commit a56483e

File tree

1 file changed

+1
-1
lines changed
  • hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-starter/src/main/java/org/hswebframework/web/oauth2/authorization

1 file changed

+1
-1
lines changed

hsweb-system/hsweb-system-oauth2-server/hsweb-system-oauth2-server-starter/src/main/java/org/hswebframework/web/oauth2/authorization/OAuth2UserTokenParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public ParsedToken parseToken(HttpServletRequest request) {
3636
accessToken = request.getParameter(OAuth2Constants.access_token);
3737
} else {
3838
String[] arr = accessToken.split("[ ]");
39-
if (arr.length > 1) {
39+
if (arr.length > 1 && ("Bearer".equalsIgnoreCase(arr[0]) || "OAuth".equalsIgnoreCase(arr[0]))) {
4040
accessToken = arr[1];
4141
}
4242
}

0 commit comments

Comments
 (0)