zitadel / oidc

Easy to use OpenID Connect client and server library written for Go and certified by the OpenID Foundation
https://zitadel.com
Apache License 2.0
1.34k stars 140 forks source link

feat: extend token exchange response #567

Closed muhlemmer closed 6 months ago

muhlemmer commented 6 months ago

This change adds fields to the token exchange and token claims types.

The act claim has been added to describe the actor in case of impersonation or delegation. An actor can be nested in case an obtained token is used as actor token to obtain impersonation or delegation. This allows creating a chain of actors. See RFC 8693, section 4.1. The invalid_target error has been added as per RFC requirements.

The id_token field has been added to the Token Exchange response so an ID Token can be returned along with an access token. This is not specified in RFC 8693, but it allows us be consistent with OpenID responses when the scope openid is set, while the requested token type may remain access token.

The token exchange client now also can use JWT Profile authentication, which was needed for integration tests in ZITADEL.

Related https://github.com/zitadel/zitadel/issues/7210

Definition of Ready

github-actions[bot] commented 6 months ago

:tada: This PR is included in version 3.15.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: