4 Replies Latest reply on Dec 13, 2012 4:38 PM by raneves

    how to get the full name of the authenticated user?

    raneves

      I have the following configuration:

       

                      <security-domain name="SPNEGO" cache-type="default">

                          <authentication>

                              <login-module code="AdvancedLdap" flag="required">

                                  <module-option name="password-stacking" value="useFirstPass"/>

                                  <module-option name="java.naming.provider.url" value="ldap://server-ad/"/>

                                  <module-option name="bindDN" value="CN=Suporte Ldap,OU=Usuarios,OU=Suporte,OU=Rede Empresarial,DC=server,DC=local"/>

                                  <module-option name="bindCredential" value="123456"/>

                                  <module-option name="baseCtxDN" value="DC=server,DC=local"/>

                                  <module-option name="baseFilter" value="(&amp;(sAMAccountName={0})(objectclass=*))"/>

                                  <module-option name="rolesCtxDN" value="OU=Rede Empresarial,DC=server,DC=local"/>

                                  <module-option name="roleFilter" value="(member={1})"/>

                                  <module-option name="roleAttributeID" value="cn"/>

                                  <module-option name="roleRecursion" value="1"/>

                                  <module-option name="principalDNPrefix" value="uid"/>

                                  <module-option name="principalDNSuffix" value="OU=Usuarios,OU=Suporte,OU=Rede Empresarial,DC=server,DC=local"/>

                                  <module-option name="matchOnUserDN" value="true"/>

                              </login-module>

                          </authentication>

                      </security-domain>

       

      but, when I try get the name of user in my application:

      getUserPrincipal().getName();

      return only LOGIN name of user, for example: Raneves.

      I need of complete name of user, for example: Rafael Neves.