Hi All,

I have written my own custom login module which is working fine. This returns a custom 
principal instead of the SimplePrincipal which has an additional organisation 
attribute.

However I was thinking in my EJB  I could cast down to my custom principal and access 
the organisation accessor. e.g 

CustomPrincipal caller = (CustomPrincipal)(this.sessionContext.getCallerPrincipal());

Logger.info(caller.getOrganisation());

However I am getting a classcast exception as it appears I am still using 
SimplePrincipal.

I think I I need to amend the ClientLoginModule to return this as well. Is this what 
everyone would expect? 

I have looked at the code for the ClientLoginModule and I assume I need to create a 
new callback to gather the organisation, construct my custom principal and provide 
this in the SecurityAssociation.setPrincipal call. 

However I am unsure if I need to invoke SecurityAssociation.setCredential(password) 
why is this used?

Any help is much appreciated.

Regards
Lea.


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

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


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to