5 Token Validation Filter - Reference Documentation
Authors: Alvaro Sanchez-Mariscal
Version: 1.0.0
5 Token Validation Filter
The token validation filter looks for the token in a HTTP header and then tries to validate the token using the configured token storage implementation.If the validation is successful, the UserDetails object is stored in the security context. This allows you to use in your application@Secured
, springSecurityService.principal
and so on.The configuration properties are:springSecurityService.currentUser
expects agrails.plugin.springsecurity.userdetails.GrailsUser
to perform a DB query. However, this plugins stores in the security context a more genericorg.springframework.security.core.userdetails.User
because it does not assume you are using domain classes to store the users. UsespringSecurityService.principal
instead.
Config key | Default value |
---|---|
grails.plugin.springsecurity.rest.token.validation.headerName | X-Auth-Token |