Merge pull request #816 from font-C/dev

fix: Bearer 全局统一大小写。
This commit is contained in:
click33
2026-03-02 07:48:58 +08:00
committed by GitHub

View File

@@ -104,7 +104,7 @@ public class SaOAuth2DataConverterDefaultImpl implements SaOAuth2DataConverter,
at.clientId = ra.clientId;
at.loginId = ra.loginId;
at.scopes = ra.scopes;
at.tokenType = SaOAuth2Consts.TokenType.bearer;
at.tokenType = SaOAuth2Consts.TokenType.Bearer;
at.expiresTime = ttlToExpireTime(accessTokenTimeout);
at.extraData = new LinkedHashMap<>();
return at;
@@ -120,7 +120,7 @@ public class SaOAuth2DataConverterDefaultImpl implements SaOAuth2DataConverter,
at.clientId = cm.clientId;
at.loginId = cm.loginId;
at.scopes = cm.scopes;
at.tokenType = SaOAuth2Consts.TokenType.bearer;
at.tokenType = SaOAuth2Consts.TokenType.Bearer;
at.grantType = GrantType.authorization_code;
at.expiresTime = ttlToExpireTime(accessTokenTimeout);
at.extraData = new LinkedHashMap<>();
@@ -153,7 +153,7 @@ public class SaOAuth2DataConverterDefaultImpl implements SaOAuth2DataConverter,
at.clientId = rt.clientId;
at.loginId = rt.loginId;
at.scopes = rt.scopes;
at.tokenType = SaOAuth2Consts.TokenType.bearer;
at.tokenType = SaOAuth2Consts.TokenType.Bearer;
at.grantType = GrantType.refresh_token;
at.extraData = new LinkedHashMap<>(rt.extraData);
at.expiresTime = ttlToExpireTime(accessTokenTimeout);
@@ -189,7 +189,7 @@ public class SaOAuth2DataConverterDefaultImpl implements SaOAuth2DataConverter,
ct.clientToken = clientTokenValue;
ct.clientId = clientModel.getClientId();
ct.scopes = scopes;
ct.tokenType = SaOAuth2Consts.TokenType.bearer;
ct.tokenType = SaOAuth2Consts.TokenType.Bearer;
ct.expiresTime = ttlToExpireTime(clientModel.getClientTokenTimeout());
ct.grantType = GrantType.client_credentials;
ct.extraData = new LinkedHashMap<>();