fix: 修改了函数名拼写

This commit is contained in:
YunaiV 2024-06-22 08:37:06 +08:00
parent 3da2449a15
commit 01b0866aa4
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ public enum OAuth2GrantTypeEnum {
private final String grantType; private final String grantType;
public static OAuth2GrantTypeEnum getByGranType(String grantType) { public static OAuth2GrantTypeEnum getByGrantType(String grantType) {
return ArrayUtil.firstMatch(o -> o.getGrantType().equals(grantType), values()); return ArrayUtil.firstMatch(o -> o.getGrantType().equals(grantType), values());
} }

View File

@ -105,7 +105,7 @@ public class OAuth2OpenController {
@RequestParam(value = "refresh_token", required = false) String refreshToken) { // 刷新模式 @RequestParam(value = "refresh_token", required = false) String refreshToken) { // 刷新模式
List<String> scopes = OAuth2Utils.buildScopes(scope); List<String> scopes = OAuth2Utils.buildScopes(scope);
// 1.1 校验授权类型 // 1.1 校验授权类型
OAuth2GrantTypeEnum grantTypeEnum = OAuth2GrantTypeEnum.getByGranType(grantType); OAuth2GrantTypeEnum grantTypeEnum = OAuth2GrantTypeEnum.getByGrantType(grantType);
if (grantTypeEnum == null) { if (grantTypeEnum == null) {
throw exception0(BAD_REQUEST.getCode(), StrUtil.format("未知授权类型({})", grantType)); throw exception0(BAD_REQUEST.getCode(), StrUtil.format("未知授权类型({})", grantType));
} }