Results 1 to 5 of 5

Thread: Logout from spring security

  1. #1

    Question Logout from spring security

    Hello,

    I am newbie learning spring and spring security.
    I am using flex->BlazeDS->SpringBlazeDSIntegration->spring stack.
    Just now i have learned how to login from flex to springsecurity.
    What I have noticed that if i login from test flex login-client and
    close the browser then tomcat manager shows that session is still active.

    What i want to do is provide a logout button on flex client and by pressing that
    user should logout from spring security and close session in server.

    Can somebody help me achieving this ?
    Any url to book/blog/article can prove a valuable resource

    Thanks and best regards

    Raja

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

    Default

    Unless you have changed anything significant from the default, you should be able to direct the user to the /j_spring_security_logout URL.
    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.


  3. #3

    Default

    Thanks for guidance,

    What I have understood is to logout from spring security I have to send
    HTTPrequest to the said url from same flex application session.

    e.g. http://localhost:8080/appl_contex/j_...ecurity_logout

    There is no need to specifically execute any method or invoke any service.
    I will test this and let u know.


    What about automatic session timeouts in tomcat ? how those are
    detected and reverted back to flex application ? I would like to put
    flex application to login screen automatically when session is timed out
    in tomcat.

    Thanks and best regards.


    Raja

  4. #4
    Join Date
    Oct 2008
    Posts
    286

    Default

    please share the solution and result..

    thanks
    Eros

    Environment:
    JSP 2.0
    Dojo 1.4.1
    Ext JS 3.1 (testing)
    Spring MVC 2.5.6.SEC01 (planning to Spring 3 using STS)
    STS
    SWF 2.0.9.RELEASE
    Tiles 2.0.5
    iBatis: ibatis-sqlmap-2.3.4.726

  5. #5

    Default

    Quote Originally Posted by eros View Post
    please share the solution and result..

    thanks
    Surely, with pleasure

    I had put two link buttons as follows

    <mx:LinkButton label="Logout" click="{navigateToURL((new URLRequest(applHome+'/j_spring_security_logout')),'_top')}"/>
    <mx:LinkButton label="Home" click="{navigateToURL((new URLRequest(applHome)),'_top')}"/>

    applHome is url for home of web application which I have hardcoded right now but will be derived from application.url at later dates.

    e.g. applHome = "http://localhost:8080/testappl";

    Thats all. tested and works like charm.

    Hope This Helps You.

    Raja

Posting Permissions

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