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

Update docs to show an audience list can be provided #229

Merged
merged 1 commit into from
Mar 21, 2022
Merged

Update docs to show an audience list can be provided #229

merged 1 commit into from
Mar 21, 2022

Conversation

nnadams
Copy link
Contributor

@nnadams nnadams commented Mar 21, 2022

The underlying Python JWT library supports validating tokens against a list of audiences. Without any code changes, I was able to just pass in a list to the AUDIENCE setting, after looking through the JWT library code. It would be nice if these docs showed this is a possible configuration:

AUTH_ADFS = {
    'AUDIENCE': ['xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx', 'api://xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx']
}

Underlying JWT library supports validating tokens against a list of audiences.
@JonasKs
Copy link
Member

JonasKs commented Mar 21, 2022

Thank you! I feel like this was added in a recent version(?), so we should probably write a note about that.

I'll see if I can find it in the patch notes which version it is tomorrow.

@nnadams
Copy link
Contributor Author

nnadams commented Mar 21, 2022

Looks like multiple audiences might be from the pull request jpadilla/pyjwt#306, released in pyjwt version 1.6.0. I think their multiple issuers pull request is still open.

Thanks for this project by the way!

@JonasKs
Copy link
Member

JonasKs commented Mar 21, 2022

Ah, perfect. I’ll merge this now. Thank you so much 😊

@JonasKs JonasKs merged commit 887422f into snok:master Mar 21, 2022
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

Successfully merging this pull request may close these issues.

2 participants