Thanks for correcting the link, that was what I was thinking of, but was working with tomcat and pasted the wrong path.
So in the end everything should work the way I thought... But it still doesnt. I built a small webapp to demonstrate how I try to use it. As you said, the login method should programatically call the authentication in he background with a given username and password. Is it possible that this way the login information (the subject) is kept only for the life of the request and not the session?
To repeat the test the following war should be deployed. It contains everything packed up. (it seems that I cannot attach a war to my message, I'll put it up to my server:
http://www.novyon.org:8180/loginDemo/loginDemo.war, the application is up and running at the same place)
1. on the index page click the admin link, and login with test / test
2. you will be welcome by the admin page with a link to a fluid role page and one to a servlet that grant the fluid role and redirects to the fluid page.
3. click the page not the servlet
4. 403 should be called as you don't already have that role, a link will get you to the servlet which should bring you back
5. instead of getting to the page, you will be brought back to the login page
on the system output
you should see three loglines from the servlet:
1. before logout is called, you don't have the fluid role
2. after logout, but before login you still don't have the fluid role
3. after login you do have the fluid role
getting back to the login page instead of the 403 means to me that the logout works as expected.
Am I missing something, or do something wrong?