Example usage for org.springframework.security.authentication ProviderManager ProviderManager

List of usage examples for org.springframework.security.authentication ProviderManager ProviderManager

Introduction

In this page you can find the example usage for org.springframework.security.authentication ProviderManager ProviderManager.

Prototype

public ProviderManager(List<AuthenticationProvider> providers, AuthenticationManager parent) 

Source Link

Usage

From source file:org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder.java

@Override
protected ProviderManager performBuild() throws Exception {
    if (!isConfigured()) {
        logger.debug("No authenticationProviders and no parentAuthenticationManager defined. Returning null.");
        return null;
    }//w  ww  .  java 2s. c o  m
    ProviderManager providerManager = new ProviderManager(authenticationProviders, parentAuthenticationManager);
    if (eraseCredentials != null) {
        providerManager.setEraseCredentialsAfterAuthentication(eraseCredentials);
    }
    if (eventPublisher != null) {
        providerManager.setAuthenticationEventPublisher(eventPublisher);
    }
    providerManager = postProcess(providerManager);
    return providerManager;
}