O'Reilly logo

Spring Security 3 by Peter Mularien

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding logout functionality

Logout is the term for a user-initiated action that results in the user's secure session being invalidated. Typically, the user will also be redirected to a non-secured area of the site after they have chosen to log out. Let's add a Log Out link to the site header, and again browse to the site to explore how and why it works after we're done.

Adding a Log Out link to the site header

As we discussed in Chapter 2, Spring Security is aware of several special URLs that serve as watch points for behavior to be triggered in one or more servlet filters in the filter chain. The signature URL for logging the user out is /j_spring_security_logout. Adding a logout link is really as simple as putting an anchor tag with the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required