Hi saspad,

I think that the answer is in fact even easier, using standard JAAS:

LoginContext loginContext = new LoginContext(JAAS_MODULE_NAME, new 
UsernamePasswordHandler(username, passwordCharArray));
loginContext.login();
try {
    // Do stuff here...
} finally {
    loginContext.logout();
}

The UsernamePasswordHandler is a simple JBoss class in 
org.jboss.security.auth.callback, and LoginContext is in 
javax.security.auth.login.

This will use the standard JBoss authentication stuff including your configured 
LoginModules.

Cheers,

Mark

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039668#4039668

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039668
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to