(Quick Reference)

6 Token Generation - Reference Documentation

Authors: Alvaro Sanchez-Mariscal

Version: 1.5.0.RC3

6 Token Generation

By default, the plugin generates JWT tokens. Note that when using JWT, you can't plug any other token generator.

If you are not using JWT, but any stateful strategy like Memcached or GORM, the following strategies are available:

The strategy used is configurable in Config.groovy:

Config keyDefault value
grails.plugin.springsecurity.rest.token.generation.useSecureRandomtrue
grails.plugin.springsecurity.rest.token.generation.useUUIDfalse

Both of them generate tokens of 32 alphanumeric characters.

That should be enough for most of the human beings. But if you still want to provide your own implementation, simply write a class implementing TokenGenerator and wire it up in resources.groovy as tokenGenerator.