Sagarmichael
Sagarmichael

Reputation: 1624

grails spring security ui password validator

I am wanting to validate a password in my own controller. Is there any way I can sent the password to spring security UI and get a return if the password validates?

Upvotes: 0

Views: 719

Answers (1)

chrislovecnm
chrislovecnm

Reputation: 2621

You are looking for:

springSecurityService.encodePassword

If you have configured your system with salt you will need that as well. Just encode the String, and read the encoded String from your user object, and compare the two

Docs:

http://grails-plugins.github.com/grails-spring-security-core/docs/manual/guide/single.html#6.2%20SpringSecurityService

Upvotes: 1

Related Questions