Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set audience on request #25

Open
korsvanloon opened this issue Feb 5, 2024 · 2 comments
Open

Set audience on request #25

korsvanloon opened this issue Feb 5, 2024 · 2 comments

Comments

@korsvanloon
Copy link
Contributor

korsvanloon commented Feb 5, 2024

Currently the audience can only be configured upon plugin creation.
However the audience is dependent on the request if I understand it correctly.

This is what ChatGPT told me:

Audience (aud) Claim:

The "audience" claim (aud) identifies the intended recipient(s) for the JWT. It specifies who the JWT is meant for.
In the context of an ecommerce website, the audience might be a specific service or application that needs to process the JWT. > For example, it could be the ecommerce application that provides personalized user experiences.
Example: If the JWT is intended for a mobile app associated with the ecommerce website, the aud claim could be set to the identifier or name of that mobile app.

@mvantellingen
Copy link
Member

The audience should indicate for which app the token is. So it should be set to my-commerce-site.com for example. So this is static. The subject is the user identifier

@korsvanloon
Copy link
Contributor Author

But you can have 1 GraphQL gateway for multiple clients. E.g. my-commerce-site.nl, my-commerce-site.fr, a mobile app, or even some kind of dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants