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

Full cached JWT validation #175

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

jowrjowr
Copy link

This PR sets things up so when the module is given a cachex key id in its options, the JWT returned by Auth0 will be fully validated using the Auth0 JWKS manifest.

A tiny refactor also came along for the ride for putting errors/data into conn to make it an integrated whole, more easier to modify in the future by using the with flow. I went really ham on with and making sure any possible failures can be accounted for.

The JWKS codepath is not engaged by testing at all as Token.maybe_validation/2 simply fails open in that case. I would not mind setting up the testing work though it isn't clear to me how to best do that.

This - in theory - changes nothing meaningful about program flow until you engage cachex, at which point it can fail due to validation reasons.

Passes existing tests and passes validation checks with live Auth0 in my development environment.

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.

1 participant