Examples of AuthType


Examples of com.alu.e3.auth.model.AuthType

    Api api = (Api)exchange.getProperty(ExchangeConstantKeys.E3_API.toString());
    if(api == null) {
      api = dataManager.getApiById(apiId);
    }

    AuthType authType = AuthType.NO_AUTH;
   
    boolean isAllowed = false;
    AuthIdentity authIdentity = null;
    AuthReport report = null;
    AuthType reportAuth = null;
   
    Iterator<IAuthExecutor> it = executors.iterator();
    while(!isAllowed && it.hasNext()) {
     
      IAuthExecutor executor = it.next();
View Full Code Here

Examples of com.alu.e3.prov.restapi.model.AuthType

    com.alu.e3.prov.restapi.model.Error error = new Error();
    error.setErrorText("");
    boolean inError = false;

    // Do some validation
    AuthType authType = auth.getType();
    if(authType == null){
      inError = true;
      error.setErrorText("Could not determine auth-type from request.");     
    } else {
      if(authType.equals(AuthType.BASIC)){
        BasicAuth basicAuth = auth.getBasicAuth();
        if(basicAuth == null){
          inError = true;
          error.setErrorText("Request did not contain BasicAuth info.");
        } else {
          if(basicAuth.getUsername() == null || basicAuth.getUsername().isEmpty()){
            inError = true;
            error.setErrorText("Username must not be empty for Basic authentication type.");
          }
          if(basicAuth.getPassword() == null || basicAuth.getPassword().length <= 0){
            inError = true;
            error.setErrorText(error.getErrorText()+" Password must not be empty for Basic authentication type.");
          }
        }
      }
      else if(authType.equals(AuthType.WSSE)){
        WSSEAuth basicAuth = auth.getWsseAuth();
        if(basicAuth == null){
          inError = true;
          error.setErrorText("Request did not contain WsseAuth info.");
        } else {
          if(basicAuth.getUsername() == null || basicAuth.getUsername().isEmpty()){
            inError = true;
            error.setErrorText("Username must not be empty for WSSE authentication type.");
          }
          if(basicAuth.getPassword() == null || basicAuth.getPassword().length <= 0){
            inError = true;
            error.setErrorText(error.getErrorText()+" Passowrd must not be empty for WSSE authentication type.");
          }
        }
      }
      else if(authType.equals(AuthType.AUTHKEY)){
        AuthKeyAuth authKeyAuth = auth.getAuthKeyAuth();
        if(authKeyAuth == null) {
          inError = true;
          error.setErrorText("Request did not contain AuthKeyAuth info.");         
        } else {
          if(authKeyAuth.getKeyValue()== null || authKeyAuth.getKeyValue().isEmpty()){
            inError = true;
            error.setErrorText("authKey must not be empty for AuthKey authentication type.")
          }
        }
      }
      else if(authType.equals(AuthType.IP_WHITE_LIST)){
        IpWhiteList ipWhiteListAuth = auth.getIpWhiteListAuth();
        if(ipWhiteListAuth == null) {
          inError = true;
          error.setErrorText("Request did not contain ipWhiteListAuth info.");             
        } else {
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtStoragePoolDef.authType

        String uuid = "921ef8b2-955a-4c18-a697-66bb9adf6131";
        String host = "127.0.0.1";
        String dir  = "cloudstackrbdpool";
        String authUsername = "admin";
        String secretUuid = "08c2fa02-50d0-4a78-8903-b742d3f34934";
        authType auth = authType.CEPH;
        int port = 6789;

        LibvirtStoragePoolDef pool = new LibvirtStoragePoolDef(type, name, uuid, host, port, dir, authUsername, auth, secretUuid);

        String expectedXml = "<pool type='" + type.toString() + "'>\n<name>" + name + "</name>\n<uuid>" + uuid + "</uuid>\n" +
                             "<source>\n<host name='" + host + "' port='" + port + "'/>\n<name>" + dir + "</name>\n" +
                             "<auth username='" + authUsername + "' type='" + auth.toString() + "'>\n<secret uuid='" + secretUuid + "'/>\n" +
                             "</auth>\n</source>\n</pool>\n";

        assertEquals(expectedXml, pool.toString());
    }
View Full Code Here

Examples of com.google.enterprise.connector.ldap.LdapConstants.AuthType

      LOG.warning("Found illegal port value: " + portString + " defaulting to 389");
      p = 389;
    }
    this.port = p;

    AuthType authtype = AuthType.ANONYMOUS;
    if (authtypeString != null) {
      try {
        authtype = Enum.valueOf(AuthType.class, authtypeString);
      } catch (IllegalArgumentException e) {
      LOG.warning("Found illegal authtype value: " + authtypeString + " defaulting to "
View Full Code Here

Examples of com.google.enterprise.connector.ldap.LdapConstants.AuthType

      int port = ldapConnectorConfig.getPort();
      LOG.fine("port " + port);
      portField.setValueFromInt(port);

      AuthType authtype = ldapConnectorConfig.getAuthtype();
      LOG.fine("authtype " + authtype);
      authTypeField.setValue(authtype);

      String username = ldapConnectorConfig.getUsername();
      LOG.fine("username " + username);
View Full Code Here

Examples of com.google.enterprise.connector.ldap.LdapConstants.AuthType

     
      // Specify connection timeout, value of zero or less means use networks timeout value
      env.put(COM_SUN_JNDI_LDAP_CONNECT_TIMEOUT, connectionTimeOut);   

      // Set our authentication settings.
      AuthType authType = settings.getAuthType();
      if (authType == AuthType.SIMPLE) {
        env.put(Context.SECURITY_AUTHENTICATION, authType.toString()
            .toLowerCase());
        env.put(Context.SECURITY_PRINCIPAL, settings.getUsername());
        env.put(Context.SECURITY_CREDENTIALS, settings.getPassword());
        LOG.info("Using simple authentication.");
      } else {
View Full Code Here

Examples of com.google.enterprise.connector.sharepoint.ldap.LdapConstants.AuthType

      Hashtable<String, String> env = new Hashtable<String, String>();
      // Use the built-in LDAP support.
      env.put(Context.INITIAL_CONTEXT_FACTORY, LdapConstants.COM_SUN_JNDI_LDAP_LDAP_CTX_FACTORY);

      // Set our authentication settings.
      AuthType authType = settings.getAuthType();
      if (authType == AuthType.SIMPLE) {
        env.put(Context.SECURITY_AUTHENTICATION, authType.toString().toLowerCase());
        env.put(Context.SECURITY_PRINCIPAL, settings.getUsername()
            + SPConstants.AT + settings.domainName);
        env.put(Context.SECURITY_CREDENTIALS, settings.getPassword());
        LOGGER.info("Using simple authentication.");
      } else {
View Full Code Here

Examples of com.google.enterprise.connector.sharepoint.ldap.LdapConstants.AuthType

            method = Method.SSL;
          } else {
            method = Method.STANDARD;
          }

          AuthType authType;
          if (AuthType.ANONYMOUS.toString().equalsIgnoreCase(
              this.authenticationType.toString())) {
            authType = AuthType.ANONYMOUS;
          } else {
            authType = AuthType.SIMPLE;
View Full Code Here

Examples of com.google.enterprise.connector.sharepoint.ldap.LdapConstants.AuthType

  /**
   * @return LDAP Authentication Type used to connect to LDAP directory server.
   */
  public String getAuthenticationType() {
    AuthType authType;
    if (AuthType.ANONYMOUS.toString().equalsIgnoreCase(
        this.authenticationType.toString())) {
      authType = AuthType.ANONYMOUS;
    } else {
      authType = AuthType.SIMPLE;
    }
    return authType.toString();
  }
View Full Code Here

Examples of com.google.enterprise.connector.sharepoint.ldap.LdapConstants.AuthType

  /**
   * @return {@linkplain LdapConnectionSettings}
   */
  public LdapConnectionSettings getLdapConnectionSettings() {
    AuthType authType;
    if (AuthType.ANONYMOUS.toString().equalsIgnoreCase(
        this.authenticationType.toString())) {
      authType = AuthType.ANONYMOUS;
    } else {
      authType = AuthType.SIMPLE;
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.