Example usage for org.springframework.security.authentication.dao DaoAuthenticationProvider setAuthoritiesMapper

List of usage examples for org.springframework.security.authentication.dao DaoAuthenticationProvider setAuthoritiesMapper

Introduction

In this page you can find the example usage for org.springframework.security.authentication.dao DaoAuthenticationProvider setAuthoritiesMapper.

Prototype

public void setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper) 

Source Link

Usage

From source file:org.davidmendoza.esu.config.SecurityConfig.java

@Bean
public DaoAuthenticationProvider daoAuthenticationProvider() {
    DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider();
    authenticationProvider.setUserDetailsService(userDetailsService);
    authenticationProvider.setPasswordEncoder(passwordEncoder());
    authenticationProvider.setAuthoritiesMapper(new RoleHierarchyAuthoritiesMapper(roleHierarchy()));
    return authenticationProvider;
}