Constructor and Description |
---|
HMacJWTSigner(String algorithm,
byte[] key)
构造
|
HMacJWTSigner(String algorithm,
Key key)
构造
|
Modifier and Type | Method and Description |
---|---|
String |
getAlgorithm()
获取算法
|
HMacJWTSigner |
setCharset(Charset charset)
设置编码
|
String |
sign(String headerBase64,
String payloadBase64)
签名
|
boolean |
verify(String headerBase64,
String payloadBase64,
String signBase64)
验签
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAlgorithmId
public HMacJWTSigner(String algorithm, byte[] key)
algorithm
- HMAC签名算法key
- 密钥public HMacJWTSigner setCharset(Charset charset)
charset
- 编码public String sign(String headerBase64, String payloadBase64)
JWTSigner
public boolean verify(String headerBase64, String payloadBase64, String signBase64)
JWTSigner
public String getAlgorithm()
JWTSigner
getAlgorithm
in interface JWTSigner
Copyright © 2024. All rights reserved.