Hi
I have written my own principal classwhcih extends org.jboss.security.SimplePrincipal
Also I have written my own LoginModule whcih extends
org.jboss.security.auth.spi.AbstractServerLoginModule
In my module when I call createIdentity method, after that I confirm that identity (i.e.
my Principal obejct) is of type MyPrincapl only.
in the login-config.xml I have defined principalClass option
[<application-policy name = "eluminate">
<login-module code="com.coremetrics.sso.module.DBLoginModule"
flag = "required">
<module-option name="debug">true</module-option>
<module-option
name="unauthenticatedIdentity">guest</module-option>
<module-option
name="principalClass">com.coremetrics.sso.principal.MyPrincipal</module-option>
</login-module>
</application-policy>]
Everything works fine for me and when I login user gets authenticated sucessfully, however
when I do request.getUserPrincipal() I get a principal Object whcih is of type
org.jboss.security.SimplePrincipal.
Also when I print that Principal Object, System.out , it calls the toString mthod
defined in MyPrincipal class.
Same thing happens when I print
org.jboss.security.SecurityAssociation.getSubject().getPrincipals()
Please can anyone tell me what I am missing
Thanks
Nipun
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983617#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...