Example usage for org.springframework.security.authentication AnonymousAuthenticationProvider setMessageSource

List of usage examples for org.springframework.security.authentication AnonymousAuthenticationProvider setMessageSource

Introduction

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

Prototype

public void setMessageSource(MessageSource messageSource) 

Source Link

Usage

From source file:ubic.gemma.security.authentication.ManualAuthenticationServiceImpl.java

/**
 * We need to do this because normally the anonymous provider has
 *//*from  w w w .j a  va  2  s.  com*/
@Override
public void afterPropertiesSet() {

    AnonymousAuthenticationProvider aap = new AnonymousAuthenticationProvider();
    aap.setKey(AuthenticationUtils.ANONYMOUS_AUTHENTICATION_KEY);
    aap.setMessageSource(messageSource);

    ((ProviderManager) this.authenticationManager).getProviders().add(aap);

}