grails / grails-spring-security-rest

Grails plugin to implement token-based, RESTful authentication using Spring Security
http://alvarosanchez.github.io/grails-spring-security-rest/
Other
203 stars 117 forks source link

Token Not being persisted when GORM is enabled #383

Closed harjitdotsingh closed 6 years ago

harjitdotsingh commented 6 years ago

I have the following setting

grails.plugin.springsecurity.rest.login.active = true
grails.plugin.springsecurity.rest.login.endpointUrl = '/api/login'
grails.plugin.springsecurity.rest.logout.endpointUrl = '/api/logout'

grails.plugin.springsecurity.rest.token.storage.useGorm = true
grails.plugin.springsecurity.rest.token.storage.gorm.tokenDomainClassName = 'com.loci.LociAuthToken'
grails.plugin.springsecurity.rest.token.storage.gorm.tokenValuePropertyName= 'tokenValue'
grails.plugin.springsecurity.rest.token.storage.gorm.usernamePropertyName = 'username'

After I login, I should see the data in my LociAuthToken table but I don't see any. What I'm I missing so that the tokens are persisted ?

harjitdotsingh commented 6 years ago

I did figure it out. I had to add this to build.gradle for it to work

compile "org.grails.plugins:spring-security-rest-gorm"