This content has been marked as final.
Show 4 replies
-
1. Re: IdentityManager username case-insensitive
kapitanpetko May 26, 2009 5:16 PM (in response to mephisto)It will be a lot easier to normalize the username in your action class, before you pass it to Identity.
-
2. Re: IdentityManager username case-insensitive
mephisto May 26, 2009 5:23 PM (in response to mephisto)You say that instead of calling
<h:commandButton value="Login" action="#{identity.login}"/>
I have to create an Action that normalizes the Identity and pass it to identity.login
something like that?
@Name("myWonderfulLoginAction") class myLoginAction() implements ... { (...) @In Identity identity; public login() { username = identity.getCredentials().getUsername().toLowerCase(); identity.setCredentials(username); identity.login(); } }
Sure it would be a way, but is there a nicer one?
greets
Nico
-
3. Re: IdentityManager username case-insensitive
mephisto May 26, 2009 5:28 PM (in response to mephisto)bulls***
getCredentials.setUsername(username);
-
4. Re: IdentityManager username case-insensitive
kapitanpetko May 27, 2009 3:29 AM (in response to mephisto)
Nico Wollenzin wrote on May 26, 2009 17:23:
You say that instead of calling<h:commandButton value="Login" action="#{identity.login}"/>
I have to create an Action that normalizes the Identity and pass it to identity.login
something like that?Yes, something like that. You will have to set the password to Credentials as well, though.
Sure it would be a way, but is there a nicer one?IMHO, that's nicer than overriding IdentityStore. If want to do validation for your credentials
and show messages (say, no space in username allowed), you are going to need a login action anyway.If you really want to override IdentityStore, you need to use the full name on your overriding component:
@Name("org.jboss.seam.security.identityStore")