Package javax.naming.ldap

Examples of javax.naming.ldap.InitialLdapContext.addToEnvironment()


                    }
                }

                log.debug("Using LDAP userDN=" + userDN);

                ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, userDN);
                ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, inputPassword);
                ctx.addToEnvironment(Context.SECURITY_AUTHENTICATION, "simple");

                //if successful then verified that user and pw are valid ldap credentials
                ctx.reconnect(null);
View Full Code Here


                }

                log.debug("Using LDAP userDN=" + userDN);

                ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, userDN);
                ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, inputPassword);
                ctx.addToEnvironment(Context.SECURITY_AUTHENTICATION, "simple");

                //if successful then verified that user and pw are valid ldap credentials
                ctx.reconnect(null);
View Full Code Here

                log.debug("Using LDAP userDN=" + userDN);

                ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, userDN);
                ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, inputPassword);
                ctx.addToEnvironment(Context.SECURITY_AUTHENTICATION, "simple");

                //if successful then verified that user and pw are valid ldap credentials
                ctx.reconnect(null);

                return true;
View Full Code Here

                    + testUserName
                    + "' was succesfully located, and the following userDN will be used in authorization check:\n";
                msg += userDN;
                log(msg);

                ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, userDN);
                ctx.addToEnvironment(Context.SECURITY_CREDENTIALS,testUserPassword);
                ctx.addToEnvironment(Context.SECURITY_AUTHENTICATION,"simple");

                // if successful then verified that user and pw
                // are valid ldap credentials
View Full Code Here

                    + "' was succesfully located, and the following userDN will be used in authorization check:\n";
                msg += userDN;
                log(msg);

                ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, userDN);
                ctx.addToEnvironment(Context.SECURITY_CREDENTIALS,testUserPassword);
                ctx.addToEnvironment(Context.SECURITY_AUTHENTICATION,"simple");

                // if successful then verified that user and pw
                // are valid ldap credentials
                ctx.reconnect(null);
View Full Code Here

                msg += userDN;
                log(msg);

                ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, userDN);
                ctx.addToEnvironment(Context.SECURITY_CREDENTIALS,testUserPassword);
                ctx.addToEnvironment(Context.SECURITY_AUTHENTICATION,"simple");

                // if successful then verified that user and pw
                // are valid ldap credentials
                ctx.reconnect(null);
                msg = "STEP-2:PASS: The user '"
View Full Code Here

      if (LdapProtocol.TLS.equals(Protocol)) {
        StartTlsRequest request = new StartTlsRequest();
        response = (StartTlsResponse) ctx.extendedOperation(request);
        response.negotiate();
        if (username != null && password != null) {
          ctx.addToEnvironment(Context.SECURITY_AUTHENTICATION,
              "simple");
          ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, username);
          ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, password);
        }
      }
View Full Code Here

        response = (StartTlsResponse) ctx.extendedOperation(request);
        response.negotiate();
        if (username != null && password != null) {
          ctx.addToEnvironment(Context.SECURITY_AUTHENTICATION,
              "simple");
          ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, username);
          ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, password);
        }
      }
      final SearchControls ctls = new SearchControls();
      ctls.setTimeLimit(timelimit * 1000);
 
View Full Code Here

        response.negotiate();
        if (username != null && password != null) {
          ctx.addToEnvironment(Context.SECURITY_AUTHENTICATION,
              "simple");
          ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, username);
          ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, password);
        }
      }
      final SearchControls ctls = new SearchControls();
      ctls.setTimeLimit(timelimit * 1000);
      ctls.setCountLimit(sizelimit);
 
View Full Code Here

            xx.initCause(x);
            result.close();
            throw xx;
          }

          result.addToEnvironment(STARTTLS_PROPERTY, "true");
          if (fDn != null)
          {

            result.addToEnvironment(Context.SECURITY_AUTHENTICATION , "simple");
            result.addToEnvironment(Context.SECURITY_PRINCIPAL, fDn);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.