wood burning stoves 2.0*
The moose likes Spring and the fly likes Custom logout handler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Custom logout handler" Watch "Custom logout handler" New topic
Author

Custom logout handler

Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 258
Hi,
I need to call a sproc when a user logs out. How do I go about adding a custom logout handler to standard spring logout handling.

Thanks
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1680
    
    7

By 'Standard spring logout handling' I assume you are using Spring Security.

The answer is write your own custom LogoutSuccessHandler





[How To Ask Questions][Read before you PM me]
Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 258
Thanks Bill.
Any suggestions to where I could read more about this. I searched through the Spring documentation, did not find info about custom handlers. Thanks.
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1680
    
    7

There is a brief mention of it in the reference documentation HERE

Otherwise take a look at API

http://static.springsource.org/spring-security/site/docs/3.1.x/apidocs/org/springframework/security/web/authentication/logout/LogoutSuccessHandler.html

or alternatively you could use

http://static.springsource.org/spring-security/site/docs/3.1.x/apidocs/org/springframework/security/web/authentication/logout/LogoutHandler.html
Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 258
Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Custom logout handler