Results 1 to 4 of 4

Thread: Questions about Spring Security 3.1

  1. #1

    Question Questions about Spring Security 3.1

    Hello !

    i would like to know how to solve this question:

    we are using Spring-security 3.1 and authenticating the user using database, and so on everything is ok, but i need to execute a method after the login and validate when process is successful, this way i can retrieve the informations about the logged user.
    where can i call this method after the login ? (when the validation is with successful)

    another question:

    I would like to know how to control the user session, with some funcionalities.

    For Exemplo:

    revoke the user that try to login twice.

    Someone can give an idea to solve these problems ?? i am looking for but i didn't find anything.

    Our Ambient:

    JSF 2.0 + PRIMEFACES 2.2.1 + JPA 2.0 + HIBERNATE 3.6.7 + SPRING-SECURITY 3.1 + FACELETS

    Thank you very much !!

  2. #2
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    Quote Originally Posted by Developer GP View Post
    but i need to execute a method after the login and validate when process is successful, this way i can retrieve the informations about the logged user.
    where can i call this method after the login ?
    You can implement your own AuthenticationSuccessHandler. This can be injected using the authentication-success-handler-ref.

    Quote Originally Posted by Developer GP View Post
    I would like to know how to control the user session, with some funcionalities.

    For Exemplo:

    revoke the user that try to login twice.
    Look at the Concurrent Session Control section of the reference
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

  3. #3

    Default Solved

    Thanks Rwinch.

    I solved the problem with this Solution:

    Code:
    public class ControleSpring implements ApplicationListener{  
      
    public void onApplicationEvent(ApplicationEvent evt){  
      
    		if(evt instaceof AuthenticationSucessEvent){  
    			// implements here
    		}  
      
    	}  
        
    }
    In the application-context-security.xml:

    Code:
    <bean class="caminhoclasse/ControleSpring"/>

  4. #4

    Default

    am not able to post a new query in spring forumss

Posting Permissions

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