| 限定符和类型 | 字段和说明 |
|---|---|
protected org.springframework.context.support.MessageSourceAccessor |
messages |
| 构造器和说明 |
|---|
JwtAuthorizationProvider(org.springframework.security.boot.biz.userdetails.JwtPayloadRepository payloadRepository) |
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication)
完成匹配Token的认证,这里返回的对象最终会通过:SecurityContextHolder.getContext().setAuthentication(authResult); 放置在上下文中
|
org.springframework.security.boot.biz.userdetails.JwtPayloadRepository |
getPayloadRepository() |
org.springframework.security.core.userdetails.UserDetailsChecker |
getUserDetailsChecker() |
boolean |
isCheckExpiry() |
boolean |
isCheckPrincipal() |
void |
setCheckExpiry(boolean checkExpiry) |
void |
setCheckPrincipal(boolean checkPrincipal) |
void |
setUserDetailsChecker(org.springframework.security.core.userdetails.UserDetailsChecker userDetailsChecker) |
boolean |
supports(Class<?> authentication) |
public JwtAuthorizationProvider(org.springframework.security.boot.biz.userdetails.JwtPayloadRepository payloadRepository)
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
throws org.springframework.security.core.AuthenticationException
完成匹配Token的认证,这里返回的对象最终会通过:SecurityContextHolder.getContext().setAuthentication(authResult); 放置在上下文中
authenticate 在接口中 org.springframework.security.authentication.AuthenticationProviderauthentication - JwtAuthenticationToken 对象JwtAuthenticationToken对象org.springframework.security.core.AuthenticationException - 认证失败会抛出异常public boolean supports(Class<?> authentication)
supports 在接口中 org.springframework.security.authentication.AuthenticationProviderpublic void setUserDetailsChecker(org.springframework.security.core.userdetails.UserDetailsChecker userDetailsChecker)
public org.springframework.security.core.userdetails.UserDetailsChecker getUserDetailsChecker()
public org.springframework.security.boot.biz.userdetails.JwtPayloadRepository getPayloadRepository()
public boolean isCheckExpiry()
public void setCheckExpiry(boolean checkExpiry)
public boolean isCheckPrincipal()
public void setCheckPrincipal(boolean checkPrincipal)
Copyright © 2024 Pivotal Software, Inc.. All rights reserved.