Examples of authenticate()


Examples of com.massivecraft.mcore.xlib.mongodb.DB.authenticate()

     
      DB db = mongoClient.getDB(muri.getDatabase());
     
      if (muri.getUsername() == null) return db;
     
      if ( ! db.authenticate(muri.getUsername(), muri.getPassword()))
      {
        //log(Level.SEVERE, "... db authentication failed.");
        return null;
      }
      return db;
View Full Code Here

Examples of com.mongodb.DB.authenticate()

      throw new IllegalArgumentException("Cannot connect to MongoDB",e);
    }

    // Authenticate
    if (mongoUri.getUsername() != null && mongoUri.getPassword() != null) {
      db.authenticate(mongoUri.getUsername(), mongoUri.getPassword());
    }

    return db;

  }
View Full Code Here

Examples of com.sos.VirtualFileSystem.Interfaces.ISOSVFSHandler.Authenticate()

      if (objDataTargetClient == null) {
        flgNewConnectionUsed = true;
        objVFS4Target = VFSFactory.getHandler(objOptions.getDataTargetType());
        objVFS4Target.setTarget();
        objVFS4Target.Connect(objOptions.getConnectionOptions().Target());
        objVFS4Target.Authenticate(objOptions);
        objDataTargetClient = (ISOSVfsFileTransfer) objVFS4Target;
        objVFS4Target.setTarget();
        objVFS4Target.Options(objOptions);
      }
View Full Code Here

Examples of com.sshtools.j2ssh.SshClient.authenticate()

            SshPrivateKeyFile file = SshPrivateKeyFile.parse(new File(PRIVATE_KEY_FILE_PATH));
            SshPrivateKey privateKey = file.toPrivateKey("");
            publicKeyAuth.setKey(privateKey);

            // Authenticate
            int result = sshClient.authenticate(publicKeyAuth);
            if(result== AuthenticationProtocolState.FAILED) {
                throw new GFacProviderException("The authentication failed", jobExecutionContext);
            } else if(result==AuthenticationProtocolState.PARTIAL) {
                throw new GFacProviderException("The authentication succeeded but another"
                        + "authentication is required", jobExecutionContext);
View Full Code Here

Examples of com.stimulus.archiva.security.realm.ADRealm.authenticate()

  public static String testAuthenticate(Config config, String username, String password)  {
      ADRealm ar = new ADRealm();
      //Principal p = ar.authenticate(username,password);
      MailArchivaPrincipal cgp = null;
      try {
          cgp = (MailArchivaPrincipal)ar.authenticate(config,username,password);
          if (cgp!=null) {
              String roleName = cgp.getRole();
              return "Authentication success. Role "+roleName+" is assigned.";
          } else
              return "Authentication failed.";
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.jmx.auth.ASJMXAuthenticator.authenticate()

            }
            //Finally do the authentication of user and password
            final ASJMXAuthenticator authenticator = new ASJMXAuthenticator();           
            authenticator.setRealmName(realmName);       
            authenticator.setLoginDriver(new ASLoginDriverImpl());       
            authenticator.authenticate(new String[] {user, password});
        } catch (Exception ex) {      
            throw new RepositoryException(
                _strMgr.getString("couldNotValidateMasterPassword", user), ex);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.security.auth.realm.certificate.CertificateRealm.authenticate()

                }
            });

            Realm realm = Realm.getInstance(CertificateRealm.AUTH_TYPE);
            CertificateRealm certRealm = (CertificateRealm)realm;
            certRealm.authenticate(fs, x500Name);
        } catch(Exception ex) {
            if (_logger.isLoggable(Level.INFO)) {
                _logger.log(Level.INFO, "java_security.audit_auth_refused",
                            userName);
            }
View Full Code Here

Examples of com.sun.enterprise.security.auth.realm.file.FileRealm.authenticate()

            String msg = sm.getString("filelm.badrealm");
            throw new LoginException(msg);
        }
        FileRealm fileRealm = (FileRealm)_currentRealm;

        String[] grpList = fileRealm.authenticate(_username, _password);

        if (grpList == null) {  // JAAS behavior
            String msg = sm.getString("filelm.faillogin", _username);
            throw new LoginException(msg);
        }
View Full Code Here

Examples of com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm.authenticate()

        if ( (_username == null) || (_username.length() == 0) ) {
            String msg = sm.getString("jdbclm.nulluser");
            throw new LoginException(msg);
        }
       
        String[] grpList = jdbcRealm.authenticate(_username, _password);

        if (grpList == null) {  // JAAS behavior
            String msg = sm.getString("jdbclm.loginfail", _username);
            throw new LoginException(msg);
        }
View Full Code Here

Examples of com.sun.enterprise.security.auth.realm.solaris.SolarisRealm.authenticate()

        if ( (_username == null) || (_username.length() == 0) ) {
            String msg = sm.getString("solarislm.nulluser");
            throw new LoginException(msg);
        }
       
        String[] grpList = solarisRealm.authenticate(_username, _password);

        if (grpList == null) {  // JAAS behavior
            String msg = sm.getString("solarislm.loginfail", _username);
            throw new LoginException(msg);
        }
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.