类 AuthorizationServerConfiguration

  • 所有已实现的接口:
    org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurer

    @EnableAuthorizationServer
    @Configuration(proxyBeanMethods=false)
    public class AuthorizationServerConfiguration
    extends org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter
    旧授权服务器(spring-security-oauth2)的一个实例,它使用一个单独的、不旋转的密钥并公开一个JWK端点。

    更多详情: Spring Security OAuth Autoconfig's documentation

    从以下版本开始:
    5.1
    作者:
    Josh Cummings
    • 构造器概要

      构造器 
      构造器 说明
      AuthorizationServerConfiguration​(org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration authenticationConfiguration, KeyPair keyPair, boolean jwtEnabled, DataSource dataSource)  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter accessTokenConverter()  
      void configure​(org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer clients)
      配置本授权服务器允许的客户端凭证信息(clientId | clientSecret)
      void configure​(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer endpoints)
      配置端点信息
      void configure​(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer security)
      配置授权服务器的校验策略
      org.springframework.security.oauth2.provider.token.TokenStore tokenStore()  
    • 构造器详细资料

      • AuthorizationServerConfiguration

        public AuthorizationServerConfiguration​(org.springframework.security.config.annotation.authentication.configuration.AuthenticationConfiguration authenticationConfiguration,
                                                KeyPair keyPair,
                                                @Value("${security.oauth2.authorizationserver.jwt.enabled:true}")
                                                boolean jwtEnabled,
                                                @Nullable
                                                DataSource dataSource)
                                         throws Exception
        抛出:
        Exception
    • 方法详细资料

      • configure

        public void configure​(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer security)
                       throws Exception
        配置授权服务器的校验策略
        指定者:
        configure 在接口中 org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurer
        覆盖:
        configure 在类中 org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter
        抛出:
        Exception
      • configure

        public void configure​(org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer clients)
                       throws Exception
        配置本授权服务器允许的客户端凭证信息(clientId | clientSecret)
        指定者:
        configure 在接口中 org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurer
        覆盖:
        configure 在类中 org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter
        抛出:
        Exception
      • configure

        public void configure​(org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer endpoints)
        配置端点信息
        指定者:
        configure 在接口中 org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurer
        覆盖:
        configure 在类中 org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter
      • tokenStore

        @Bean
        public org.springframework.security.oauth2.provider.token.TokenStore tokenStore()
      • accessTokenConverter

        @Bean
        public org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter accessTokenConverter()