public class CustomPreAuthenticatedUserDetailsService<T extends org.springframework.security.core.Authentication> extends Object implements org.springframework.security.core.userdetails.AuthenticationUserDetailsService<T>, org.springframework.beans.factory.InitializingBean
| 构造器和说明 |
|---|
CustomPreAuthenticatedUserDetailsService(org.springframework.security.core.userdetails.UserDetailsService userDetailsService,
AuthorizationInfoHandle authorizationInfoHandle,
org.springframework.security.oauth2.provider.token.TokenStore tokenStore)
构造函数
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterPropertiesSet() |
org.springframework.security.core.userdetails.UserDetails |
loadUserDetails(T authentication)
加载用户详情信息 根据刷新令牌和认证信息获取用户详情 支持根据不同的授权类型选择不同的用户信息获取方式
|
public CustomPreAuthenticatedUserDetailsService(org.springframework.security.core.userdetails.UserDetailsService userDetailsService,
AuthorizationInfoHandle authorizationInfoHandle,
org.springframework.security.oauth2.provider.token.TokenStore tokenStore)
userDetailsService - 用户详情服务authorizationInfoHandle - 授权信息处理器tokenStore - Token存储服务public void afterPropertiesSet()
throws Exception
afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBeanExceptionpublic org.springframework.security.core.userdetails.UserDetails loadUserDetails(T authentication) throws org.springframework.security.core.userdetails.UsernameNotFoundException
loadUserDetails 在接口中 org.springframework.security.core.userdetails.AuthenticationUserDetailsService<T extends org.springframework.security.core.Authentication>authentication - 认证信息org.springframework.security.core.userdetails.UsernameNotFoundException - 当用户不存在时抛出Copyright © 2025. All rights reserved.