Sergio del Amo
Sergio del Amo

Reputation: 78096

How to log out user from web site using FORM authentication?

I am using FORM authentication, together with Realm. I would like to know how can I log out.

The only solution so far is to close browser, but that's not acceptable from the usability standpoint.

Upvotes: 5

Views: 3713

Answers (2)

Jacob Mattison
Jacob Mattison

Reputation: 51052

Most likely, invalidating the session (HttpSession's "invalidate()" command) will log out the user -- when you close the browser, you're doing the equivalent.

Upvotes: 5

Aaron Digulla
Aaron Digulla

Reputation: 328594

Most forms of authentication use a cookie on the browser to track the session, so you only need to delete that cookie. The Firefox plugin Web Developer can give you a list of cookies for the current domain.

Upvotes: 0

Related Questions