Example usage for org.springframework.security.web.authentication.www DigestAuthenticationFilter setCreateAuthenticatedToken

List of usage examples for org.springframework.security.web.authentication.www DigestAuthenticationFilter setCreateAuthenticatedToken

Introduction

In this page you can find the example usage for org.springframework.security.web.authentication.www DigestAuthenticationFilter setCreateAuthenticatedToken.

Prototype

public void setCreateAuthenticatedToken(boolean createAuthenticatedToken) 

Source Link

Document

If you set this property, the Authentication object, which is created after the successful digest authentication will be marked as authenticated and filled with the authorities loaded by the UserDetailsService.

Usage

From source file:org.opendatakit.configuration.SecurityConfiguration.java

@Bean
public DigestAuthenticationFilter digestAuthenticationFilter()
        throws ODKEntityNotFoundException, ODKOverQuotaException, ODKDatastoreException, PropertyVetoException {
    DigestAuthenticationFilter digestAuthenticationFilter = new DigestAuthenticationFilter();
    digestAuthenticationFilter.setPasswordAlreadyEncoded(true);
    digestAuthenticationFilter.setAuthenticationEntryPoint(digestEntryPoint());
    digestAuthenticationFilter.setUserDetailsService(digestAndBasicLoginService());
    // https://github.com/spring-projects/spring-security/issues/3310
    digestAuthenticationFilter.setCreateAuthenticatedToken(true);
    return digestAuthenticationFilter;
}