Example usage for org.springframework.security.web.context HttpSessionSecurityContextRepository setSpringSecurityContextKey

List of usage examples for org.springframework.security.web.context HttpSessionSecurityContextRepository setSpringSecurityContextKey

Introduction

In this page you can find the example usage for org.springframework.security.web.context HttpSessionSecurityContextRepository setSpringSecurityContextKey.

Prototype

public void setSpringSecurityContextKey(String springSecurityContextKey) 

Source Link

Document

Allows the session attribute name to be customized for this repository instance.

Usage

From source file:org.lightadmin.core.config.context.LightAdminSecurityConfiguration.java

@Bean
public Filter securityContextPersistenceFilter() {
    HttpSessionSecurityContextRepository repo = new HttpSessionSecurityContextRepository();
    repo.setSpringSecurityContextKey(
            keyWithNamespace(HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY));
    return new SecurityContextPersistenceFilter(repo);
}