Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Spring Social Remember me with Facebook/Twitter login

  1. #11
    Join Date
    Jan 2006
    Location
    San Francisco
    Posts
    10

    Default

    Hi Bjorn,

    Thanks for getting back to me, and forgive my ignorance, but where is the 'alwaysRemember' flag set? In the xml config?

    Joe

  2. #12
    Join Date
    Aug 2011
    Location
    California
    Posts
    6

    Default

    Quote Originally Posted by josephshoop View Post
    Hi Bjorn,

    Thanks for getting back to me, and forgive my ignorance, but where is the 'alwaysRemember' flag set? In the xml config?

    Joe
    AbstractRemeberMeServices.java

    private boolean alwaysRemember;

    So, you'd have to wire up your RememberMeServices with alwaysRemember set to true.
    I was playing around with Spring Security 3.1 at one point and noticed this defaulted to false whereas Spring Security 3.0 defaulted to true.

  3. #13
    Join Date
    Jan 2006
    Location
    San Francisco
    Posts
    10

    Default

    Thanks Bjorn! Just switched to 3.1...not sure I would have noticed that.

  4. #14

    Default

    Hi,
    Can some one put whole code for this process here.
    I am really want to use it but dont know from where to start.

    spring framework
    Last edited by abani; Dec 18th, 2011 at 01:22 AM.

  5. #15
    Join Date
    Jan 2006
    Location
    San Francisco
    Posts
    10

    Default

    Hey Abani..

    The code is understandable by taking in a look at both Spring Security and Spring Social examples. I would look at the latest Spring Social examples, as well as following the Spring Security examples. If you have already done that, you will be able to use Bjorn's sample code. What I needed to do, and what Bjorn makes clear, is set alwaysRemember in the rememberMeServices config...for example:


    Code:
    	<beans:bean id="rememberMeServices" class="org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices">
    	  <beans:property name="userDetailsService" ref="userDetailsService"/>
    	  <beans:property name="key" value="rememberMeKey"/>
    	  <beans:property name="alwaysRemember" value="true"/>	  
    	</beans:bean>
    There are quite a few integration steps, but with the great Spring Security and Spring Social Tutorials, it is pretty easy, and rad.

    Joe

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •