[jboss-dev-forums] [Design of Security on JBoss] - How to set the principal name
petertmartin
do-not-reply at jboss.com
Wed Jul 4 06:23:02 EDT 2007
In our application the user has a "remember me" option, which creates a cookie on their machine.
If the cooky is set the token stored in the cookie is used as the username and the password is set to null. The format of the token is 'token_' e.g. 'token_test'.
I have written a custom login module that checks for the token and does the necessary checks. When 'createIdentity()' is called we use the name of the user we have extracted from the token e.g. 'test'.
Inside our web application, if we get the user Principal and call 'getName()' the name returned is 'token_test', when I am expecting 'test'.
In my login module I can see SimplePrincipal is created correctly with 'test' as the name. Is there a way for me to see the correct principal name within my app?
Thanks
Peter.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060334#4060334
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060334
More information about the jboss-dev-forums
mailing list