类 OAuth2ServletSessionConfiguration
java.lang.Object
cn.herodotus.stirrup.oauth2.authorization.config.OAuth2ServletSessionConfiguration
@Configuration(proxyBeanMethods=false)
public class OAuth2ServletSessionConfiguration
extends Object
Description: Servlet 环境下,针对 OAuth2 和 Security的 Session 共享配置
因高度依赖 Spring Security 以及 OAuth2 的内容,而且所有基于 Servlet 的服务都需要使用到,所以将其放置在 OAuth2 Authorization 模块下
- 作者:
- : gengwei.zheng
- Date:
- : 2023/8/27 16:05
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明org.springframework.security.web.session.HttpSessionEventPublisherIf a SessionRegistry @Bean is registered and is an instance of SessionRegistryImpl, a HttpSessionEventPublisher @Bean SHOULD also be registered as it’s responsible for notifying SessionRegistryImpl of session lifecycle events, f or example, SessionDestroyedEvent, to provide the ability to remove the SessionInformation instance.voidsessionManagementConfigurerCustomer(org.springframework.security.core.session.SessionRegistry sessionRegistry) <S extends org.springframework.session.Session>
org.springframework.security.core.session.SessionRegistrysessionRegistry(org.springframework.session.FindByIndexNameSessionRepository<S> sessionRepository)
-
构造器详细资料
-
OAuth2ServletSessionConfiguration
public OAuth2ServletSessionConfiguration()
-
-
方法详细资料
-
postConstruct
@PostConstruct public void postConstruct() -
sessionRegistry
@Bean @ConditionalOnMissingBean public <S extends org.springframework.session.Session> org.springframework.security.core.session.SessionRegistry sessionRegistry(org.springframework.session.FindByIndexNameSessionRepository<S> sessionRepository) -
sessionManagementConfigurerCustomer
@Bean @ConditionalOnMissingBean public OAuth2SessionManagementConfigurerCustomer sessionManagementConfigurerCustomer(org.springframework.security.core.session.SessionRegistry sessionRegistry) -
httpSessionEventPublisher
@Bean @ConditionalOnMissingBean public org.springframework.security.web.session.HttpSessionEventPublisher httpSessionEventPublisher()If a SessionRegistry @Bean is registered and is an instance of SessionRegistryImpl, a HttpSessionEventPublisher @Bean SHOULD also be registered as it’s responsible for notifying SessionRegistryImpl of session lifecycle events, f or example, SessionDestroyedEvent, to provide the ability to remove the SessionInformation instance.- 返回:
HttpSessionEventPublisher
-