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

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

Introduction

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

Prototype

public boolean isEraseCredentialsAfterAuthentication() 

Source Link

Usage

From source file:org.red5.demo.auth.Application.java

@Override
public boolean appStart(IScope app) {
    // authentication management
    ProviderManager authManager = (ProviderManager) applicationContext.getBean("authManager");
    log.info("Available auth providers: {}", authManager.getProviders().size());
    if (authManager.isEraseCredentialsAfterAuthentication()) {
        log.info("Provider set to erase creds, changing to NOT do this");
        authManager.setEraseCredentialsAfterAuthentication(false);
    }/*from   w  w  w . j a va 2 s  .  com*/
    // add an authentication listener
    addListener((IApplication) applicationContext.getBean("authHandler"));
    // hit the super class
    return super.appStart(app);
}

From source file:org.red5.webapps.admin.Application.java

@Override
public boolean appStart(IScope app) {
    log.info("Admin application started");
    // authentication check
    ProviderManager authManager = (ProviderManager) applicationContext.getBean("authenticationManager");
    log.info("Available auth providers: {}", authManager.getProviders().size());
    if (authManager.isEraseCredentialsAfterAuthentication()) {
        log.info("Provider set to erase creds, changing to NOT do this");
        authManager.setEraseCredentialsAfterAuthentication(false);
    }/*from   w ww.j  a v  a2  s .c om*/
    // add an authentication listener
    if (enforceAuthentication) {
        addListener(new Red5AuthenticationHandler(applicationContext));
    }
    return true;
}