Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Sample JWT auth #4

Open
ccleve opened this issue Jun 1, 2018 · 1 comment
Open

Sample JWT auth #4

ccleve opened this issue Jun 1, 2018 · 1 comment

Comments

@ccleve
Copy link
Member

ccleve commented Jun 1, 2018

In a separate module, add support for JWT authorization. Use a context filter. Make it easy to add custom properties to the token.

@ccleve
Copy link
Member Author

ccleve commented Jun 1, 2018

Implement JWT. Do it in a ContainerRequestFilter. Just register it like any other resource.
Try to create a User object that implements UserPrincipal and set it in the filter in a SecurityContext.
Inject SecurityContext into methods or services where needed.
https://antoniogoncalves.org/2016/10/03/securing-jax-rs-endpoints-with-jwt/
SecurityFilter should look for either an apikey in an Auth header, or a cookie. Maybe.

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

No branches or pull requests

1 participant