public class JwtTokenDecoder extends Object implements TokenDecoder
| Constructor and Description |
|---|
JwtTokenDecoder() |
| Modifier and Type | Method and Description |
|---|---|
AuthToken |
decodeFromBytes(byte[] content) |
AuthToken |
decodeFromString(String content) |
void |
decryptEncryptedJWT(com.nimbusds.jwt.EncryptedJWT encryptedJWT)
Decrypt the Encrypted JWT
|
boolean |
isSigned() |
void |
setAudiences(List<String> auds)
set the token audiences
|
void |
setDecryptionKey(byte[] key) |
void |
setDecryptionKey(PrivateKey key) |
void |
setVerifyKey(byte[] key) |
void |
setVerifyKey(PublicKey key) |
boolean |
verifySignedJWT(com.nimbusds.jwt.SignedJWT signedJWT)
verify the Signed JWT
|
public AuthToken decodeFromBytes(byte[] content) throws IOException
decodeFromBytes in interface TokenDecoderIOExceptionpublic AuthToken decodeFromString(String content) throws IOException
decodeFromString in interface TokenDecoderIOExceptionpublic void decryptEncryptedJWT(com.nimbusds.jwt.EncryptedJWT encryptedJWT)
throws IOException
encryptedJWT - an encrypted JWTIOException - epublic void setDecryptionKey(PrivateKey key)
setDecryptionKey in interface TokenDecoderpublic void setDecryptionKey(byte[] key)
setDecryptionKey in interface TokenDecoderpublic boolean verifySignedJWT(com.nimbusds.jwt.SignedJWT signedJWT)
throws IOException
signedJWT - a signed JWTIOException - epublic void setVerifyKey(PublicKey key)
setVerifyKey in interface TokenDecoderpublic void setVerifyKey(byte[] key)
setVerifyKey in interface TokenDecoderpublic void setAudiences(List<String> auds)
auds - the list of token audiencespublic boolean isSigned()
isSigned in interface TokenDecoderCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.