类 ResourceServerConfig
java.lang.Object
cn.bbwres.biscuit.gateway.authorization.ResourceServerConfig
@AutoConfiguration
@EnableWebFluxSecurity
@EnableConfigurationProperties(GatewayProperties.class)
public class ResourceServerConfig
extends Object
资源配置
- 版本:
- $Id: $Id
- 作者:
- zhanglinfeng
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明org.springframework.util.PathMatcher路径匹配器authorizationManager(ResourceCacheService resourceCacheService, org.springframework.util.PathMatcher pathMatcher) 认证管理器org.springframework.security.web.server.authorization.ServerAccessDeniedHandlercustomServerAccessDeniedHandler(GatewayProperties gatewayProperties) 无权访问自定义响应org.springframework.security.web.server.ServerAuthenticationEntryPointcustomServerAuthenticationEntryPoint(GatewayProperties gatewayProperties) 无效token/token过期 自定义响应org.springframework.boot.autoconfigure.http.HttpMessageConvertersmessageConverters(org.springframework.beans.factory.ObjectProvider<org.springframework.http.converter.HttpMessageConverter<?>> converters) messageConverters.resourceCacheService(GatewayProperties gatewayProperties, ResourceService resourceService) 资源缓存服务org.springframework.security.web.server.authentication.ServerAuthenticationConverter设置获取token的转换器org.springframework.security.web.server.SecurityWebFilterChainspringSecurityFilterChain(org.springframework.security.config.web.server.ServerHttpSecurity http, GatewayProperties gatewayProperties, AuthorizationManager authorizationManager, org.springframework.security.web.server.authorization.ServerAccessDeniedHandler customServerAccessDeniedHandler, org.springframework.security.web.server.ServerAuthenticationEntryPoint customServerAuthenticationEntryPoint, org.springframework.beans.factory.ObjectProvider<org.springframework.security.authentication.ReactiveAuthenticationManager> reactiveAuthenticationManager) 安全处理类
-
构造器详细资料
-
ResourceServerConfig
public ResourceServerConfig()
-
-
方法详细资料
-
antPathMatcher
@Bean public org.springframework.util.PathMatcher antPathMatcher()路径匹配器- 返回:
- a
PathMatcherobject
-
authorizationManager
@Bean public AuthorizationManager authorizationManager(ResourceCacheService resourceCacheService, org.springframework.util.PathMatcher pathMatcher) 认证管理器- 参数:
resourceCacheService- aResourceCacheServiceobjectpathMatcher- aPathMatcherobject- 返回:
- a
AuthorizationManagerobject
-
resourceCacheService
@Bean public ResourceCacheService resourceCacheService(GatewayProperties gatewayProperties, ResourceService resourceService) 资源缓存服务- 参数:
gatewayProperties- aGatewayPropertiesobjectresourceService- aResourceServiceobject- 返回:
- a
ResourceCacheServiceobject
-
serverAuthenticationConverter
@Bean public org.springframework.security.web.server.authentication.ServerAuthenticationConverter serverAuthenticationConverter()设置获取token的转换器- 返回:
- a
ServerAuthenticationConverterobject
-
messageConverters
@Bean @ConditionalOnMissingBean public org.springframework.boot.autoconfigure.http.HttpMessageConverters messageConverters(org.springframework.beans.factory.ObjectProvider<org.springframework.http.converter.HttpMessageConverter<?>> converters) messageConverters.
- 参数:
converters- aObjectProviderobject- 返回:
- a
HttpMessageConvertersobject
-
springSecurityFilterChain
@Bean public org.springframework.security.web.server.SecurityWebFilterChain springSecurityFilterChain(org.springframework.security.config.web.server.ServerHttpSecurity http, GatewayProperties gatewayProperties, AuthorizationManager authorizationManager, org.springframework.security.web.server.authorization.ServerAccessDeniedHandler customServerAccessDeniedHandler, org.springframework.security.web.server.ServerAuthenticationEntryPoint customServerAuthenticationEntryPoint, org.springframework.beans.factory.ObjectProvider<org.springframework.security.authentication.ReactiveAuthenticationManager> reactiveAuthenticationManager) 安全处理类- 参数:
http- aServerHttpSecurityobjectgatewayProperties- aGatewayPropertiesobjectauthorizationManager- aAuthorizationManagerobjectcustomServerAccessDeniedHandler- aServerAccessDeniedHandlerobjectcustomServerAuthenticationEntryPoint- aServerAuthenticationEntryPointobjectreactiveAuthenticationManager- aReactiveAuthenticationManagerobject- 返回:
- a
SecurityWebFilterChainobject
-
customServerAccessDeniedHandler
@Bean public org.springframework.security.web.server.authorization.ServerAccessDeniedHandler customServerAccessDeniedHandler(GatewayProperties gatewayProperties) 无权访问自定义响应- 参数:
gatewayProperties- aGatewayPropertiesobject- 返回:
- a
ServerAccessDeniedHandlerobject
-
customServerAuthenticationEntryPoint
@Bean public org.springframework.security.web.server.ServerAuthenticationEntryPoint customServerAuthenticationEntryPoint(GatewayProperties gatewayProperties) 无效token/token过期 自定义响应- 参数:
gatewayProperties- aGatewayPropertiesobject- 返回:
- a
ServerAuthenticationEntryPointobject
-