类 DefaultCustomizeTokenEndpointConfigurer

java.lang.Object
io.github.mangocrisp.spring.taybct.auth.security.granter.DefaultCustomizeTokenEndpointConfigurer
所有已实现的接口:
ICustomizeTokenEndpointConfigurer, org.springframework.security.config.Customizer<org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2TokenEndpointConfigurer>

public class DefaultCustomizeTokenEndpointConfigurer extends Object implements ICustomizeTokenEndpointConfigurer
默认的 token 端口自定义配置
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    private org.springframework.security.web.authentication.AuthenticationSuccessHandler
    成功回调
    private @NonNull org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService
    鉴权管理,可以从这里根据刷新 token 获取新的 token 什么的
    自定义的用户查询服务
    private @NonNull io.github.mangocrisp.spring.taybct.tool.core.support.IEncryptedPassable
     
    private org.springframework.security.web.authentication.AuthenticationFailureHandler
    失败回调
    你还可以自定义一些对端点的配置
    private @NonNull org.springframework.security.crypto.password.PasswordEncoder
    加密器
    private @NonNull org.springframework.data.redis.core.RedisTemplate<Object,Object>
    这里可以设置使用 redis 来获取验证码来做校验
    private @NonNull org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<? extends org.springframework.security.oauth2.core.OAuth2Token>
    token 生成器
  • 构造器概要

    构造器
  • 方法概要

    修饰符和类型
    方法
    说明
    private void
    authByPhone(org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2TokenEndpointConfigurer tokenEndpoint)
    根据手机号鉴权
    private void
    authByRefreshToken(org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2TokenEndpointConfigurer tokenEndpoint)
    根据刷新 token 鉴权,OAuth2 自带的刷新 token 模式只能适用于他自己的授权码模式, 如果是使用 taybct 模式获取到的 token 只能使用 taybct_refresh 来刷新
    private void
    authByUserName(org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2TokenEndpointConfigurer tokenEndpoint)
    根据用户名鉴权
    void
    customize(org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2TokenEndpointConfigurer tokenEndpoint)
     

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • customizeUserDetailsService

      @NonNull private @NonNull ICustomizeUserDetailsService customizeUserDetailsService
      自定义的用户查询服务
    • passwordEncoder

      @NonNull private @NonNull org.springframework.security.crypto.password.PasswordEncoder passwordEncoder
      加密器
    • accessTokenResponseHandler

      private org.springframework.security.web.authentication.AuthenticationSuccessHandler accessTokenResponseHandler
      成功回调
    • errorResponseHandler

      private org.springframework.security.web.authentication.AuthenticationFailureHandler errorResponseHandler
      失败回调
    • tokenGenerator

      @NonNull private @NonNull org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator<? extends org.springframework.security.oauth2.core.OAuth2Token> tokenGenerator
      token 生成器
    • otherTokenEndpointConfigurer

      @NonNull private @NonNull IOtherTokenEndpointConfigurer otherTokenEndpointConfigurer
      你还可以自定义一些对端点的配置
    • redisTemplate

      @NonNull private @NonNull org.springframework.data.redis.core.RedisTemplate<Object,Object> redisTemplate
      这里可以设置使用 redis 来获取验证码来做校验
    • authorizationService

      @NonNull private @NonNull org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService authorizationService
      鉴权管理,可以从这里根据刷新 token 获取新的 token 什么的
    • encryptedPassable

      @NonNull private @NonNull io.github.mangocrisp.spring.taybct.tool.core.support.IEncryptedPassable encryptedPassable
  • 构造器详细资料

    • DefaultCustomizeTokenEndpointConfigurer

      public DefaultCustomizeTokenEndpointConfigurer()
  • 方法详细资料

    • customize

      public void customize(org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2TokenEndpointConfigurer tokenEndpoint)
      指定者:
      customize 在接口中 org.springframework.security.config.Customizer<org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2TokenEndpointConfigurer>
    • authByRefreshToken

      private void authByRefreshToken(org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2TokenEndpointConfigurer tokenEndpoint)
      根据刷新 token 鉴权,OAuth2 自带的刷新 token 模式只能适用于他自己的授权码模式, 如果是使用 taybct 模式获取到的 token 只能使用 taybct_refresh 来刷新
      参数:
      tokenEndpoint - token 端点
    • authByPhone

      private void authByPhone(org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2TokenEndpointConfigurer tokenEndpoint)
      根据手机号鉴权
      参数:
      tokenEndpoint - token 端点
    • authByUserName

      private void authByUserName(org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2TokenEndpointConfigurer tokenEndpoint)
      根据用户名鉴权
      参数:
      tokenEndpoint - token 端点