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

Fail to instantiate validator when audience is an empty string #183

Merged
merged 4 commits into from
Nov 21, 2022

Conversation

sergiught
Copy link
Contributor

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

🔧 Changes

An empty audience should never be allowed to be set when the validator gets instantiated.

What happens currently is that if an audience is set as empty on the validator, the validation of the JWT will still fail but only within the request lifecycle.

We're adding the extra len(audience) validation now on the validator so we can fail earlier on app bootstrap in case we pass a nil or empty audience.

📚 References

🔬 Testing

@sergiught sergiught self-assigned this Nov 21, 2022
@sergiught sergiught force-pushed the patch/improve-audience-error-msg branch from b6e7977 to 059a573 Compare November 21, 2022 09:03
@sergiught sergiught marked this pull request as ready for review November 21, 2022 09:05
@sergiught sergiught requested a review from a team as a code owner November 21, 2022 09:05
@sergiught sergiught merged commit bf461c8 into master Nov 21, 2022
@sergiught sergiught deleted the patch/improve-audience-error-msg branch November 21, 2022 16:32
@ewanharris ewanharris mentioned this pull request Dec 1, 2023
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