mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 03:57:32 +00:00
feat: role claims for service user tokens (#5577)
tokens of service users can now contain role claims by requesting them through scopes
This commit is contained in:
@@ -112,10 +112,13 @@ func (c *Client) IsScopeAllowed(scope string) bool {
|
||||
if strings.HasPrefix(scope, domain.SelectIDPScope) {
|
||||
return true
|
||||
}
|
||||
if strings.HasPrefix(scope, ScopeUserMetaData) {
|
||||
if scope == ScopeUserMetaData {
|
||||
return true
|
||||
}
|
||||
if strings.HasPrefix(scope, ScopeResourceOwner) {
|
||||
if scope == ScopeResourceOwner {
|
||||
return true
|
||||
}
|
||||
if scope == ScopeProjectsRoles {
|
||||
return true
|
||||
}
|
||||
for _, allowedScope := range c.allowedScopes {
|
||||
|
Reference in New Issue
Block a user