@LoadLevel(name="jjwt", order=0) public class JJwt extends Object implements IJwt
| Constructor and Description |
|---|
JJwt(io.jsonwebtoken.SignatureAlgorithm signatureAlgorithm,
Key secretKey) |
JJwt(io.jsonwebtoken.SignatureAlgorithm signatureAlgorithm,
String secretKeyStr,
String secretKeyAlgorithm) |
JJwt(String signatureAlgorithmStr,
String secretKeyStr,
String secretKeyAlgorithm) |
| Modifier and Type | Method and Description |
|---|---|
String |
create(String jwtId,
Map<String,Object> claims,
Date issuedAt,
Date expiresAt)
创建JWT
|
JwtInfo |
parse(String jwtStr,
long leeway)
解析JWT
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitparse, parsepublic JJwt(io.jsonwebtoken.SignatureAlgorithm signatureAlgorithm,
Key secretKey)
public JJwt(io.jsonwebtoken.SignatureAlgorithm signatureAlgorithm,
String secretKeyStr,
String secretKeyAlgorithm)
public String create(String jwtId, Map<String,Object> claims, Date issuedAt, Date expiresAt)
IJwtBuildercreate in interface IJwtBuilderjwtId - JWT的IDclaims - 私有声明issuedAt - 签发时间expiresAt - 过期时间,不能小于等于签发时间,为空时表示永久有效public JwtInfo parse(String jwtStr, long leeway)
IJwtParserparse in interface IJwtParserjwtStr - JWT串leeway - 容忍空间,单位:秒。当不能晚于当前时间时,向后容忍;不能早于向前容忍。Copyright © 2021–2022 EasyJ????. All rights reserved.