Package org.springframework.ldap

Examples of org.springframework.ldap.ContextMapper


    String password = (String) auth.getCredentials();
    DistinguishedName dn = new DistinguishedName(nameAttrName + "=" + userName);
    String ldapPassword = null;
    try {
      ldapPassword = (String) ldapTemplate.lookup(dn, new String[] { "userPassword" },
          new ContextMapper() {
            public Object mapFromContext(Object ctx) {
              DirContextAdapter context = (DirContextAdapter) ctx;
              return new String((byte[]) context.getObjectAttribute("userPassword"));
            }
          });
View Full Code Here


      throws AuthenticationException {
    DistinguishedName dn = new DistinguishedName(nameAttrName + "=" + username);
    String ldapPassword = null;
    try {
      ldapPassword = (String) ldapTemplate.lookup(dn, new String[] { "userPassword" },
          new ContextMapper() {
            public Object mapFromContext(Object ctx) {
              DirContextAdapter context = (DirContextAdapter) ctx;
              return new String((byte[]) context.getObjectAttribute("userPassword"));
            }
          });
View Full Code Here

TOP

Related Classes of org.springframework.ldap.ContextMapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.