This content has been marked as final.
Show 1 reply
-
1. Re: JAAS integration w/ 3rd party webservice stack
sim-smith Apr 22, 2007 9:54 PM (in response to saspad)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