类 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 ICustomizeUserDetailsService
自定义的用户查询服务private @NonNull io.github.mangocrisp.spring.taybct.tool.core.support.IEncryptedPassable
private org.springframework.security.web.authentication.AuthenticationFailureHandler
失败回调private @NonNull IOtherTokenEndpointConfigurer
你还可以自定义一些对端点的配置private @NonNull org.springframework.security.crypto.password.PasswordEncoder
加密器这里可以设置使用 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)
-
字段详细资料
-
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> tokenGeneratortoken 生成器 -
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 端点
-