1 Reply Latest reply on Mar 26, 2010 8:02 PM by Thomas Küstermann

    How to remove the case sensitive of the login?

    Nicolas U. Newbie


      I have implement standard seam authentification and my login is case sensitive.:

      /** name. */
      @UserPrincipal // user principal permet de definir le "login" .
      private String userName;
      /** password. */
      @UserPassword(hash = "MD5") // définit ce champ comme étant le mot de passe.
      private String passwordHash;

      and same stuff in xhtml:

        <h:form id="login"> 
          <f:facet name="header">Login</f:facet> 
          <p>Veuillez vous identifier.</p>  
           <div class="dialog">  
             <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value"> 
                <h:outputLabel for="username">Nom d'utilisateur:</h:outputLabel>  
                <h:inputText id="username" value="#{credentials.username}"/>  
                <h:outputLabel for="password">Password</h:outputLabel>  
                <h:inputSecret id="password" value="#{credentials.password}"/>  
         <div class="actionButtons">  
            <h:commandButton value="Login" action="#{identity.login}"/>  

      I can login me with user jean but i can't with JEAN or Jean

      How remove the case sensitive of the login? (i keep case sensitive the password)


        • 1. Re: How to remove the case sensitive of the login?
          Thomas Küstermann Newbie

          Hmm, interesting topic. If I look at the source code of class org.jboss.seam.security.Credentials I would install my own Crendentials component.

          The custom Credentials component would look like this:

          public class CustomCredentials extends Credentials {
              public void setUsername(String username) {
                  super.setUsername(username == null ? null : username.toLowerCase());

          I don't know if this is the best solution, but it should work. Hope that helps!