public String authenticate(final String username, final String password) {
    String principal = null;

    try {
      OServerUserConfiguration user = getUser(username);

      if (isPasswordValid(user)) {
        if (OSecurityManager.instance().checkPassword(password, user.password)) {
          principal = user.name;
        }
      }
    } catch (Exception ex) {
      OLogManager.instance().error(this, "ODefaultPasswordAuthenticator.authenticate()", ex);
    }

    return principal;
  }
public String authenticate(final String username, final String password) {
    String principal = null;

    try {
      OServerUserConfiguration user = getUser(username);

      if (isPasswordValid(user)) {
        if (OSecurityManager.instance().checkPassword(password, user.password)) {
          principal = user.name;
        }
      }
    } catch (Exception ex) {
      OLogManager.instance().error(this, "ODefaultPasswordAuthenticator.authenticate()", ex);
    }

    return principal;
  }
public String authenticate ( final String username , final String password ) { String principal = null ; try { OServerUserConfiguration user = getUser ( username ) ; if ( isPasswordValid ( user ) ) { if ( OSecurityManager . instance ( ) . checkPassword ( password , user . password ) ) { principal = user . name ; } } } catch ( Exception ex ) { OLogManager . instance ( ) . error ( this , "ODefaultPasswordAuthenticator.authenticate()" , ex ) ; } return principal ; }
Returns the actual username if successful, null otherwise.
Returns the actual username if successful null otherwise .