Announcement Announcement Module
Collapse
No announcement yet.
Questions about Spring Security 3.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    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

    Comment


    • #3
      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"/>

      Comment


      • #4
        am not able to post a new query in spring forumss

        Comment

        Working...
        X