spring-securityjwtspring-security-oauth2auth0grails3

Auth0 + Grails 3 + Spring Security


my project is client app (angular4) and api server (grails3) and we would like to start using Auth0. If i got it right, with usage of JWT i can have "session-less" API architecture with following flow:

1) user in client app login (for example with lock)

2) all requests to API will contains jwt token and api can "verify" token + add roles (roles can be park of "token_id", for example as custom claims).

Current API security is done by Spring Security :

So here is my question:

Thank you very much !


Solution

  • Take a look at this plugin http://plugins.grails.org/plugin/grails/spring-security-rest. It works on top of spring security and supports JWT auth, and you don't need to change a lot in your code