public class AppJWTSigner extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static AppAlgorithm |
DEFAULT_ALGORITHM |
| Constructor and Description |
|---|
AppJWTSigner(byte[] secret) |
AppJWTSigner(PrivateKey privateKey) |
AppJWTSigner(String secret) |
| Modifier and Type | Method and Description |
|---|---|
String |
postSign(byte[] preEncoded,
String preSign) |
String |
preSign(Map<String,Object> claims,
AppAlgorithm alg) |
String |
sign(Map<String,Object> claims,
AppAlgorithm algorithm) |
byte[] |
signByAlg(String signingInput,
AppAlgorithm algorithm) |
protected static final AppAlgorithm DEFAULT_ALGORITHM
public AppJWTSigner(String secret)
public AppJWTSigner(byte[] secret)
public AppJWTSigner(PrivateKey privateKey)
public String sign(Map<String,Object> claims, AppAlgorithm algorithm) throws Exception
Exceptionpublic String preSign(Map<String,Object> claims, AppAlgorithm alg)
public byte[] signByAlg(String signingInput, AppAlgorithm algorithm) throws NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException, com.auth0.jwt.JWTAlgorithmException
NoSuchAlgorithmExceptionInvalidKeyExceptionNoSuchProviderExceptionSignatureExceptioncom.auth0.jwt.JWTAlgorithmExceptionCopyright © 2020. All rights reserved.