Spring Security Remember Me not working

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Spring Security Remember Me not working

John Thompson
I have a simple app using the Spring Security Core plugin and can't get the remember me functionality to work.  The session times out and the user is required to login again.

In config.groovy I set:
grails.plugins.springsecurity.rememberMe.alwaysRemember = true

No luck.

Also tried on the login form:
<input name="_spring_security_remember_me" type="hidden" value="checked"/>

The option for persistent rememeber me is the default of false.

Any suggestions?


JT
jts-blog.com
Reply | Threaded
Open this post in threaded view
|

Re: Spring Security Remember Me not working

Bill Thornton
Does your user domain have a username property? Spring Security will call User.findWhere { username = "John" }

See GormUserDetailsService.loadUserByUsername() for more information

If not I would look into enabling debug logging for SpringSecurity so you can see any errors in the logs.

On 1 March 2013 15:22, John Thompson <[hidden email]> wrote:
I have a simple app using the Spring Security Core plugin and can't get the
remember me functionality to work.  The session times out and the user is
required to login again.

In config.groovy I set:
grails.plugins.springsecurity.rememberMe.alwaysRemember = true

No luck.

Also tried on the login form:
<input name="_spring_security_remember_me" type="hidden" value="checked"/>

The option for persistent rememeber me is the default of false.

Any suggestions?






-----
JT
jts-blog.com
--
View this message in context: http://grails.1312388.n4.nabble.com/Spring-Security-Remember-Me-not-working-tp4641965.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





Reply | Threaded
Open this post in threaded view
|

Re: Spring Security Remember Me not working

John Thompson
Yep - I ran the s2 setup script.

Login / logout & roles are working fine.

Prob is when the session dies, the user needs to sign in again.
JT
jts-blog.com
Reply | Threaded
Open this post in threaded view
|

Re: Spring Security Remember Me not working

Eamonn O'Connell-2
<input name="_spring_security_remember_me" type="hidden" value="checked"/>



On 1 March 2013 17:04, John Thompson <[hidden email]> wrote:
Yep - I ran the s2 setup script.

Login / logout & roles are working fine.

Prob is when the session dies, the user needs to sign in again.



-----
JT
jts-blog.com
--
View this message in context: http://grails.1312388.n4.nabble.com/Spring-Security-Remember-Me-not-working-tp4641965p4641968.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Spring Security Remember Me not working

Eamonn O'Connell-2
<input name="_spring_security_remember_me" type="hidden" value="checked"/>

have you tried with an actual check box ? you could even default it to be checked 


On 1 March 2013 17:21, Eamonn O'Connell <[hidden email]> wrote:
<input name="_spring_security_remember_me" type="hidden" value="checked"/>



On 1 March 2013 17:04, John Thompson <[hidden email]> wrote:
Yep - I ran the s2 setup script.

Login / logout & roles are working fine.

Prob is when the session dies, the user needs to sign in again.



-----
JT
jts-blog.com
--
View this message in context: http://grails.1312388.n4.nabble.com/Spring-Security-Remember-Me-not-working-tp4641965p4641968.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




Reply | Threaded
Open this post in threaded view
|

Re: Spring Security Remember Me not working

jeffpogo
In reply to this post by John Thompson
I could not get rememberMe to work with persistent = true.

Did you try:

grails.plugins.springsecurity.rememberMe.persistent=false

Please let me know if you get it working with persistent = true -- because, I would like to use that feature but did not have any luck with it.

Jeff.