code: public void registerAuthenticationProvider(Class<? extends AuthenticationProvider> providerClass) {
      AuthenticationProvider provider = instantiateProvider(providerClass);
      authenticationProviders.put(provider.getName(), providerClass);  
      credentialAuths.put(provider.getName(), provider.requiresCredentials());
    }
docs: Registers an authentication provider to this class.
  
  @param providerClass The authentication provider to be registered