Results 1 to 2 of 2

Thread: Spring Security: Multiple Logins to the same resources: Form Login + Facebook Connect

  1. #1

    Default Spring Security: Multiple Logins to the same resources: Form Login + Facebook Connect

    To begin I know about

    http://blog.kadirpekel.com/2009/11/0...ring-security/

    The only problem is that it completely replaces the Form Login with Facebook Connect.

    I have the native form login in place,

    I also have Facebook Connect in place, Upon gathering user information I link it to a native account but without a password.

    At that point I would like to call a link or method to start process of going into the Spring Security Filter Chain.

    Here is the source code that works, but am trying to modify. It contains all the files I'm taking about.

    http://code.google.com/p/spring-secu...rity/facebook/

    Now from what I understand I need to add a custom FacebookAuthenticationProvider so that my AuthenticationManager knows about it.

    Code:
    <bean id="facebookAuthenticationProvider" class="org.springframework.security.facebook.FacebookAuthenticationProvider">
    </bean>
    
    <security:authentication-manager alias="authenticationManager">
            <security:authentication-provider ref="facebookAuthenticationProvider" />
    </security:authentication-manager>
    Then within the FacebookAuthenticationProvider I would have to call an FacebookAuthenticationToken that would take my the current facebook Uid and SessionKey of the user.

    Then try authenticate this Token.

    So where does the FacebookAuthenticationFilter come into it?

    I'm just trying to understand the order at which these 3 files are called. As if you were trying to implement any other custom authentication.

    FacebookAuthenticationFilter.java
    FacebookAuthenticationProvider.java
    FacebookAuthenticationToken.java


    I have also posted this on stackoverflow.com

    http://stackoverflow.com/questions/1...n-facebook-con

  2. #2
    Join Date
    Sep 2004
    Location
    Manchester, NH
    Posts
    1,236

    Default

    You should simply be able to add another AuthenticationProvider as usual. AuthenticationManager can accommodate multiple AuthenticationProviders. The FacebookAuthenticationFilter is not replacing the form login - it's being placed before the form login filter (at least, if you are following that blog entry).
    Peter Mularien | Blog
    Author, Spring Security 3 (Book) - Packt Publishing, Available in print and eBook form
    SCJP 5, Oracle DBA
    Any postings are my own opinion, and should not be attributed to my employer or clients.


Tags for this Thread

Posting Permissions

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