mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 12:57:34 +00:00
fix(token exchange): properly return an error if membership is missing (#9468)
# Which Problems Are Solved
When requesting a JWT (`urn:ietf:params:oauth:token-type:jwt`) to be
returned in a Token Exchange request, ZITADEL would panic if the `actor`
was not granted the necessary permission.
# How the Problems Are Solved
Properly check the error and return it.
# Additional Changes
None
# Additional Context
- closes #9436
(cherry picked from commit e6ce1af003
)
This commit is contained in:
@@ -349,6 +349,9 @@ func (s *Server) createExchangeJWT(
|
||||
"",
|
||||
domain.OIDCResponseTypeUnspecified,
|
||||
)
|
||||
if err != nil {
|
||||
return "", "", 0, err
|
||||
}
|
||||
accessToken, err = s.createJWT(ctx, client, session, getUserInfo, roleAssertion, getSigner)
|
||||
if err != nil {
|
||||
return "", "", 0, err
|
||||
|
Reference in New Issue
Block a user