Hi there,
I have the following code working to run a client java application to login a user on the jboss server running with jaas authentication.
JaasJbossConfiguration.activateConfiguration();
UsernamePasswordHandler handler = new UsernamePasswordHandler("userName", "passWord");
LoginContext lc = new LoginContext("myrealm", handler);
try {
lc.login();
} catch (LoginException e) {
// Authentication failed.
}
Now I wonder how to test if this user is in a specific role or better how to get all roles. I'd like to do this from client side.