zitadel/internal/auth/repository/eventsourcing/eventstore
Tim Möhlmann 9d5cd12cd4
fix(oidc): define audience inside auth request instead of token creation (#7610)
fix(oidc): define audience inside auth request instead off token creation

When using the v1 OIDC Code flow, tokens would not carry the correct audience when returned as JWT. This applies to access tokens as JWT and ID tokens.
Introspection would still show the correct audience.
This happened because project audience was appended at token creation time. This stored the appended audience, used later in introspection or token refresh. However, the OIDC library still only had a view of the original auth request with the original audience.
When signing JWTs it would use this outdated information.

This change moves audience modifications to the auth request creation. This is was already the way it was done for v2 login and now v1 follows the same method.

Co-authored-by: Livio Spring <livio.a@gmail.com>
2024-03-21 19:42:44 +02:00
..
auth_request_test.go fix: reduce eventual consistency (#7075) 2023-12-14 11:07:47 +01:00
auth_request.go fix(oidc): define audience inside auth request instead of token creation (#7610) 2024-03-21 19:42:44 +02:00
org.go feat(eventstore): increase parallel write capabilities (#5940) 2023-10-19 12:19:10 +02:00
refresh_token.go fix: reduce eventual consistency (#7075) 2023-12-14 11:07:47 +01:00
token.go fix: reduce eventual consistency (#7075) 2023-12-14 11:07:47 +01:00
user_session.go refactor: cleanup unused code (#7130) 2024-01-02 14:26:31 +00:00
user.go fix: reduce eventual consistency (#7075) 2023-12-14 11:07:47 +01:00