forked from baron/baron-sso
offline_access 기본 강제 제거 및 refresh_token grant 정책 정리
This commit is contained in:
@@ -3828,7 +3828,7 @@ func requestIncludesInlineHeadlessJWKS(req clientUpsertRequest) bool {
|
||||
}
|
||||
|
||||
func defaultClientScopes() []string {
|
||||
return []string{"openid", "profile", "email", "offline_access"}
|
||||
return []string{"openid", "profile", "email"}
|
||||
}
|
||||
|
||||
func defaultGrantTypes() []string {
|
||||
@@ -3848,7 +3848,7 @@ func normalizeClientScopes(scopes []string) []string {
|
||||
seen := make(map[string]struct{}, len(scopes))
|
||||
for _, scope := range scopes {
|
||||
scope = strings.TrimSpace(scope)
|
||||
if scope == "" || isLegacyRefreshTokenScopeAlias(scope) {
|
||||
if scope == "" || isRefreshTokenScopeAlias(scope) {
|
||||
continue
|
||||
}
|
||||
if _, ok := seen[scope]; ok {
|
||||
@@ -3860,9 +3860,9 @@ func normalizeClientScopes(scopes []string) []string {
|
||||
return normalized
|
||||
}
|
||||
|
||||
func isLegacyRefreshTokenScopeAlias(scope string) bool {
|
||||
func isRefreshTokenScopeAlias(scope string) bool {
|
||||
switch strings.ToLower(strings.TrimSpace(scope)) {
|
||||
case "offline":
|
||||
case "offline", "offline_access":
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user