mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
feat(api): allow specifying access_token type (opaque/JWT) for service users (#5150)
Add functionality to configure the access token type on the service accounts to provide the oidc library with the necessary information to create the right type of access token.
This commit is contained in:
@@ -31,7 +31,16 @@ func AddAudScopeToAudience(ctx context.Context, audience, scopes []string) []str
|
||||
if projectID == ProjectIDScopeZITADEL {
|
||||
projectID = authz.GetInstance(ctx).ProjectID()
|
||||
}
|
||||
audience = append(audience, projectID)
|
||||
audience = addProjectID(audience, projectID)
|
||||
}
|
||||
return audience
|
||||
}
|
||||
|
||||
func addProjectID(audience []string, projectID string) []string {
|
||||
for _, a := range audience {
|
||||
if a == projectID {
|
||||
return audience
|
||||
}
|
||||
}
|
||||
return append(audience, projectID)
|
||||
}
|
||||
|
Reference in New Issue
Block a user