@Override
  public Authentication authenticate(Authentication authentication) throws AuthenticationException {
    if (authentication instanceof GemFireAuthentication) {
      GemFireAuthentication gemAuth = (GemFireAuthentication) authentication;
      if (gemAuth.isAuthenticated()) {
        return gemAuth;
      }
    }

    String name = authentication.getName();
    String password = authentication.getCredentials().toString();

    logger.debug("Connecting to GemFire with user=" + name);
    JMXConnector jmxc =
        repository.getClusterWithUserNameAndPassword(name, password).getJMXConnector();
    if (jmxc == null) {
      throw new BadCredentialsException("Error connecting to GemFire JMX Server");
    }

    Collection<GrantedAuthority> list = GemFireAuthentication.populateAuthorities(jmxc);
    GemFireAuthentication auth = new GemFireAuthentication(authentication.getPrincipal(),
        authentication.getCredentials(), list);
    logger.debug("For user " + name + " authList=" + list);
    return auth;
  }
Spring security AuthenticationProvider for GemFire. It connects to gemfire manager using given
credentials. Successful connect is treated as successful authentication and web user is
authenticated

@since GemFire version 9.0
geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/security/GemFireAuthenticationProvider.java