Thanks for the quick response!

Actually, I don't specifically need a custom Role class, that was just how the 
existing Login Module works. 

The LoginModule is not JBoss-specific, so it does not extend 
UsernamePasswordLoginModule or use SimpleGroup/SimplePrincipal.

In the initialize() method, I set the provided Subject as a member variable.

In the login() method, after a successful login, I create a custom User 
Principal (and Role Principal(s), but let's not worry about that for now). 
Those get assigned to other member vars.

In the commit() method, I add the user and roles to the Subject stored earlier:

  |      mSubject.getPrincipals().add(mUserPrincipal);
  |      mSubject.getPrincipals().addAll(mPrincipals);
  | 

On the Wiki page, this is somewhat different; the caller principal gets added 
to a "CallerPrincipal" group which is then added to the Subject. Also, there is 
the 'principalClass' defined as a module-option for the 
CustomPrincipalLoginModule.

I can see how to do the former - if necessary i could create my own Group impl 
(since the login module doesn't have access to SimpleGroup). 

But I don't know how to deal with the custom principalClass module-option. How 
would i use the custom principal in a custom Login Module with no JBoss 
dependencies?


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3936933


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to