类 ResourceServerConfig

java.lang.Object
cn.bbwres.biscuit.gateway.authorization.ResourceServerConfig

@AutoConfiguration @EnableWebFluxSecurity @EnableConfigurationProperties(GatewayProperties.class) public class ResourceServerConfig extends Object
资源配置
版本:
$Id: $Id
作者:
zhanglinfeng
  • 构造器详细资料

    • ResourceServerConfig

      public ResourceServerConfig()
  • 方法详细资料

    • antPathMatcher

      @Bean public org.springframework.util.PathMatcher antPathMatcher()
      路径匹配器
      返回:
      a PathMatcher object
    • authorizationManager

      @Bean public AuthorizationManager authorizationManager(ResourceCacheService resourceCacheService, org.springframework.util.PathMatcher pathMatcher)
      认证管理器
      参数:
      resourceCacheService - a ResourceCacheService object
      pathMatcher - a PathMatcher object
      返回:
      a AuthorizationManager object
    • resourceCacheService

      @Bean public ResourceCacheService resourceCacheService(GatewayProperties gatewayProperties, ResourceService resourceService)
      资源缓存服务
      参数:
      gatewayProperties - a GatewayProperties object
      resourceService - a ResourceService object
      返回:
      a ResourceCacheService object
    • serverAuthenticationConverter

      @Bean public org.springframework.security.web.server.authentication.ServerAuthenticationConverter serverAuthenticationConverter()
      设置获取token的转换器
      返回:
      a ServerAuthenticationConverter object
    • messageConverters

      @Bean @ConditionalOnMissingBean public org.springframework.boot.autoconfigure.http.HttpMessageConverters messageConverters(org.springframework.beans.factory.ObjectProvider<org.springframework.http.converter.HttpMessageConverter<?>> converters)

      messageConverters.

      参数:
      converters - a ObjectProvider object
      返回:
      a HttpMessageConverters object
    • 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 - a ServerHttpSecurity object
      gatewayProperties - a GatewayProperties object
      authorizationManager - a AuthorizationManager object
      customServerAccessDeniedHandler - a ServerAccessDeniedHandler object
      customServerAuthenticationEntryPoint - a ServerAuthenticationEntryPoint object
      reactiveAuthenticationManager - a ReactiveAuthenticationManager object
      返回:
      a SecurityWebFilterChain object
    • customServerAccessDeniedHandler

      @Bean public org.springframework.security.web.server.authorization.ServerAccessDeniedHandler customServerAccessDeniedHandler(GatewayProperties gatewayProperties)
      无权访问自定义响应
      参数:
      gatewayProperties - a GatewayProperties object
      返回:
      a ServerAccessDeniedHandler object
    • customServerAuthenticationEntryPoint

      @Bean public org.springframework.security.web.server.ServerAuthenticationEntryPoint customServerAuthenticationEntryPoint(GatewayProperties gatewayProperties)
      无效token/token过期 自定义响应
      参数:
      gatewayProperties - a GatewayProperties object
      返回:
      a ServerAuthenticationEntryPoint object