@Bean
  ClientRegistration clientRegistration() {
    return ClientRegistration.withRegistrationId(providerId)
        .authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE)
        .redirectUri("{baseUrl}/login/oauth2/code/{registrationId}")
        .clientId(clientId)
        .clientSecret(clientSecret)
        .scope("openid", "CLUSTER:READ", "CLUSTER:WRITE", "DATA:READ", "DATA:WRITE")
        .authorizationUri(authorizationUri)
        .tokenUri(tokenUri)
        .userInfoUri(userInfoUri)
        .jwkSetUri(jwkSetUri)
        .providerConfigurationMetadata(
            singletonMap("end_session_endpoint", endSessionEndpoint))
        // When Spring shows the login page, it displays a link to the OAuth provider's
        // authorization URI. Spring uses the value passed to clientName() as the text for that
        // link. We pass the providerName property here, to let the user know which OAuth provider
        // they will be redirected to.
        .clientName(providerName)
        .userNameAttributeName(userNameAttributeName)
        .build();
  }
Configures Pulse to use the OAuth 2 provider defined by properties in {@code pulse.properties}.
geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/security/OAuthClientConfig.java