@Override
  public Principal authenticate(final Properties credentials, final DistributedMember member)
      throws AuthenticationFailedException {
    final String userName = credentials.getProperty(UserPasswordAuthInit.USER_NAME);
    if (userName == null) {
      throw new AuthenticationFailedException("DummyAuthenticator: user name property ["
          + UserPasswordAuthInit.USER_NAME + "] not provided");
    }

    final String password = credentials.getProperty(UserPasswordAuthInit.PASSWORD);
    if (password == null) {
      throw new AuthenticationFailedException("DummyAuthenticator: password property ["
          + UserPasswordAuthInit.PASSWORD + "] not provided");
    }

    if (userName.equals(password) && checkValidName(userName)) {
      return new UsernamePrincipal(userName);
    } else {
      throw new AuthenticationFailedException(
          "DummyAuthenticator: Invalid user name [" + userName + "], password supplied.");
    }
  }
A dummy implementation of the {@link Authenticator} interface that expects a user name and
password allowing authentication depending on the format of the user name.

@since GemFire 5.5
geode-dunit/src/main/java/org/apache/geode/security/templates/DummyAuthenticator.java