OAuth2 provider: support for granular scopes
- `CheckOAuthAccessToken` returns both user ID and additional scopes - `grantAdditionalScopes` returns AccessTokenScope ready string (grantScopes) compiled from requested additional scopes by the client - `userIDFromToken` sets returned grantScopes (if any) instead of default `all`
This commit is contained in:
parent
3301e7dc75
commit
4eb8d8c496
4 changed files with 76 additions and 26 deletions
|
@ -110,5 +110,6 @@ func loadApplicationsData(ctx *context.Context) {
|
|||
ctx.ServerError("GetOAuth2GrantsByUserID", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["EnableAdditionalGrantScopes"] = setting.OAuth2.EnableAdditionalGrantScopes
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue