Skip to content

Commit 23ba114

Browse files
committed
clarify why the default is full access scope all
1 parent f26c7b7 commit 23ba114

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

services/oauth2_provider/access_token.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ func GrantAdditionalScopes(grantScopes string) auth.AccessTokenScope {
8888
}
8989
}
9090

91+
// since version 1.22, access tokens grant full access to the API
92+
// with this access is reduced only if additional scopes are provided
9193
accessTokenScope := auth.AccessTokenScope(strings.Join(tokenScopes, ","))
9294
if accessTokenWithAdditionalScopes, err := accessTokenScope.Normalize(); err == nil && len(tokenScopes) > 0 {
9395
return accessTokenWithAdditionalScopes

0 commit comments

Comments
 (0)