[jboss-user] [Security & JAAS/JBoss] - Re: SecurityAssociation and ClientLoginModule authentication
jaikiran
do-not-reply at jboss.com
Wed Dec 24 01:31:29 EST 2008
"jaikiran" wrote : However, is there a way where i can clear of the user credentials and relogin with a new password. The usecase i am trying is :
|
| // Login with incorrect password
| | SecurityClient client = SecurityClientFactory.getSecurityClient();
| | client.setSimple("anil", "incorrectpass");
| |
| | // access bean - which will throw exception because of invalid password
| | bean.doAuthorizedOp();
| |
| | // Now logout the client since password was incorrect
| | client.logout();
| |
| | // Now pass the correct password
| | client.setSimple("anil", "correctpass");
| |
| | // try accessing the bean authorized method
| | // should have passed but fails with "Invalid User" exception
| | bean.doAuthorizedOp();
| |
|
This works too. client.logout( ) clears the credentials.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198406#4198406
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198406
More information about the jboss-user
mailing list