Class OAuth2ConfigurerUtils

java.lang.Object
cn.herodotus.engine.oauth2.authentication.utils.OAuth2ConfigurerUtils

public final class OAuth2ConfigurerUtils extends Object

Description: OAuth 2.0 Configurers 工具方法类

新版 spring-security-oauth2-authorization-server 很多代码都是“包”级可访问的,外部无法使用。为了方便扩展将其提取出来,便于使用。

代码内容与原包代码基本一致。

Author:
: gengwei.zheng
Date:
: 2022/2/25 9:57
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationConsentService
    getAuthorizationConsentService(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
     
    static org.springframework.security.oauth2.server.authorization.settings.AuthorizationServerSettings
    getAuthorizationServerSettings(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
     
    static org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService
    getAuthorizationService(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
     
    static <T> T
    getBean(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity, Class<T> type)
     
    static <T> T
    getBean(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity, org.springframework.core.ResolvableType type)
     
    static com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext>
    getJwkSource(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
     
    static <T> T
    getOptionalBean(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity, Class<T> type)
     
    static <T> T
    getOptionalBean(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity, org.springframework.core.ResolvableType type)
     
    static org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository
    getRegisteredClientRepository(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
     
    static org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<? extends org.springframework.security.oauth2.core.OAuth2Token>
    getTokenGenerator(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
     
    static String
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • withMultipleIssuersPattern

      public static String withMultipleIssuersPattern(String endpointUri)
    • getRegisteredClientRepository

      public static org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository getRegisteredClientRepository(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
    • getAuthorizationService

      public static org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService getAuthorizationService(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
    • getAuthorizationConsentService

      public static org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationConsentService getAuthorizationConsentService(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
    • getTokenGenerator

      public static org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<? extends org.springframework.security.oauth2.core.OAuth2Token> getTokenGenerator(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
    • getJwkSource

      public static com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> getJwkSource(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
    • getAuthorizationServerSettings

      public static org.springframework.security.oauth2.server.authorization.settings.AuthorizationServerSettings getAuthorizationServerSettings(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
    • getBean

      public static <T> T getBean(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity, Class<T> type)
    • getBean

      public static <T> T getBean(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity, org.springframework.core.ResolvableType type)
    • getOptionalBean

      public static <T> T getOptionalBean(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity, Class<T> type)
    • getOptionalBean

      public static <T> T getOptionalBean(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity, org.springframework.core.ResolvableType type)