public class DefaultJwtTokenParser extends JwtTokenParser<DefaultJwtUser>
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
AUTHORIZATION_HEADER |
protected static java.lang.String |
BEARER |
protected static java.lang.String |
PERMISSIONS |
protected static java.lang.String |
USER_ID |
protected static java.lang.String |
USERNAME |
SEVEN, SIMPLE_SECURITY_REQ_ATTR_USER, simpleSecurityProperties| Constructor and Description |
|---|
DefaultJwtTokenParser(SimpleSecurityProperties simpleSecurityProperties) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getClaimsMap(DefaultJwtUser user) |
protected java.lang.String |
getTokenFromRequest(javax.servlet.http.HttpServletRequest request)
如何从request中获取token
|
protected DefaultJwtUser |
getUserFromClaims(io.jsonwebtoken.Claims claims)
如何从jwt中返回user
|
generateToken, getClaimsFromToken, getExpirationDateFromToken, getRequest, getUser, getUserFromToken, validateTokenprotected static final java.lang.String USER_ID
protected static final java.lang.String USERNAME
protected static final java.lang.String PERMISSIONS
protected static final java.lang.String AUTHORIZATION_HEADER
protected static final java.lang.String BEARER
public DefaultJwtTokenParser(SimpleSecurityProperties simpleSecurityProperties)
protected java.util.Map<java.lang.String,java.lang.Object> getClaimsMap(DefaultJwtUser user)
getClaimsMap in class JwtTokenParser<DefaultJwtUser>protected DefaultJwtUser getUserFromClaims(io.jsonwebtoken.Claims claims)
JwtTokenParsergetUserFromClaims in class JwtTokenParser<DefaultJwtUser>claims - jwtClaimsprotected java.lang.String getTokenFromRequest(javax.servlet.http.HttpServletRequest request)
JwtTokenParsergetTokenFromRequest in class JwtTokenParser<DefaultJwtUser>request - 请求Copyright © 2019. All Rights Reserved.