Results 1 to 2 of 2

Thread: destroy session upon logging out.Help!

  1. #1
    Join Date
    Feb 2005
    Posts
    7

    Default destroy session upon logging out.Help!

    Hi. I am a new user of acegi and i do have question regarding invalidation of session upon logging out. In my application, i only had the line "session.invalidate();" in the action. when i tried getting the authentication object from the context holeder (which i think holds the user's info), after "session.invalidate()", the authentication object is not null.so when the user tries clicking "BACK" button (in the browser), he/she is directed to his/her previously visited page.

    I am using the code below to extract the authentication object:
    SecureContext sContext=((SecureContext)ContextHolder.getContext( ));
    Authentication auth = sContext.getAuthentication();

    i had included in the bean filterInvocationInceptor(applicationContext-acegi-secutity.xml) that all my jsp pages would require an authority "ROLE_SOMEROLE", but since i am still getting the user's granted authority (even after logging off), my user is able to navigate back to the previous page.

    I am just playing around here.. so i had tried:
    HttpSessionIntegrationFilter hsif= new HttpSessionIntegrationFilter();
    hsif.destroy();
    but still not working. when i try
    SecureContext sContext2=((SecureContext)ContextHolder.getContext ());
    Authentication auth 2= sContext2.getAuthentication();
    again, auth2 returns what my other variable auth returns.

    Please help. any will be much appreciated. thanks in advance!
    Tin

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    That's a bit odd, and I'd suggest it's related to your filter ordering being incorrect. Check out http://acegisecurity.sourceforge.net...-filters-order. Note 0.8.0 will be released today, so you're probably best off waiting and getting it working with that release (ContextHolder management has changed).

Similar Threads

  1. OpenSessionInView and portlet support
    By garpinc2 in forum Web Flow
    Replies: 31
    Last Post: Apr 9th, 2010, 11:12 AM
  2. OpenSessionInView + CMT Session usage
    By alesj in forum Data
    Replies: 7
    Last Post: Aug 16th, 2005, 02:32 AM
  3. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  4. Replies: 1
    Last Post: Mar 12th, 2005, 04:33 AM
  5. Replies: 3
    Last Post: Nov 19th, 2004, 07:16 PM

Posting Permissions

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