[jboss-user] [Security & JAAS/JBoss] - Re: JAAS integration w/ 3rd party webservice stack

sim-smith do-not-reply at jboss.com
Sun Apr 22 21:54:43 EDT 2007


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



More information about the jboss-user mailing list