Skip to content

Full cached JWT validation#175

Open
jowrjowr wants to merge 2 commits intoachedeuzot:masterfrom
Immersiva1:master
Open

Full cached JWT validation#175
jowrjowr wants to merge 2 commits intoachedeuzot:masterfrom
Immersiva1:master

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