@LoadLevel(name="hutool", order=100) public class HutoolJwt extends Object implements IJwt
| Constructor and Description |
|---|
HutoolJwt(cn.hutool.jwt.signers.JWTSigner signer) |
HutoolJwt(String algorithmId,
Key secretKey) |
HutoolJwt(String algorithmId,
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 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.