feat: add user metadata scope and claim (#2268)

* feat: add user metadata scope and claime

* docs: scope

* docs: metadata base 64 encoded

* docs: metadata base 64 encoded

* docs: metadata base 64 encoded
This commit is contained in:
Fabi
2021-08-26 13:38:13 +02:00
committed by GitHub
parent 1da68420bc
commit 5b4c64d740
5 changed files with 49 additions and 9 deletions

View File

@@ -106,6 +106,9 @@ func (c *Client) IsScopeAllowed(scope string) bool {
if strings.HasPrefix(scope, authreq_model.ProjectIDScope) {
return true
}
if strings.HasPrefix(scope, ScopeUserMetaData) {
return true
}
for _, allowedScope := range c.allowedScopes {
if scope == allowedScope {
return true