hugegraph-api/src/main/java/com/baidu/hugegraph/auth/StandardAuthenticator.java
/**
     * Verify if a user is legal
     * @param username  the username for authentication
     * @param password  the password for authentication
     * @return String No permission if return ROLE_NONE else return a role
     */
Verify if a user is legal
@param username  the username for authentication
@param password  the password for authentication
@return String No permission if return ROLE_NONE else return a role
Verify if a user is legal @param username the username for authentication @param password the password for authentication @return String No permission if return ROLE_NONE else return a role
public String authenticate(final String username, final String password) {
        E.checkArgumentNotNull(username,
                               "The username parameter can't be null");
        E.checkArgumentNotNull(password,
                               "The password parameter can't be null");
        String role;
        if (password.equals(this.tokens.get(username))) {
            role = username;
        } else {
            role = ROLE_NONE;
        }
        return role;
    }
public String authenticate ( final String username , final String password ) { E . checkArgumentNotNull ( username , "The username parameter can't be null" ) ; E . checkArgumentNotNull ( password , "The password parameter can't be null" ) ; String role ; if ( password . equals ( this . tokens . get ( username ) ) ) { role = username ; } else { role = ROLE_NONE ; } return role ; }
Verify if a user is legal
 @param username  the username for authentication
 @param password  the password for authentication
 @return String No permission if return ROLE_NONE else return a role
Verify if a user is legal @param username the username for authentication @param password the password for authentication @return String No permission if return ROLE_NONE else return a role
// Return user name as role