完成 oauth2 code 授权码模式的实现

This commit is contained in:
YunaiV
2022-05-15 15:59:49 +08:00
parent 66034d26c0
commit 99ba7ccee8
14 changed files with 267 additions and 31 deletions

View File

@ -20,7 +20,7 @@ import java.util.Collections;
*/
public class SecurityFrameworkUtils {
public static final String TOKEN_TYPE = "Bearer";
public static final String AUTHORIZATION_BEARER = "Bearer";
private SecurityFrameworkUtils() {}
@ -36,7 +36,7 @@ public class SecurityFrameworkUtils {
if (!StringUtils.hasText(authorization)) {
return null;
}
int index = authorization.indexOf(TOKEN_TYPE + " ");
int index = authorization.indexOf(AUTHORIZATION_BEARER + " ");
if (index == -1) { // 未找到
return null;
}