public class SignedThenEncryptedJwt extends EncryptedJwt
| Constructor and Description |
|---|
SignedThenEncryptedJwt(JweHeader header,
SignedJwt payload,
Key publicKey)
Constructs a fresh signed-then-encrypted JWT with the given signed JWT payload, JWE headers and encryption key.
|
SignedThenEncryptedJwt(JweHeader header,
String encodedHeader,
byte[] encryptedContentEncryptionKey,
byte[] initialisationVector,
byte[] ciphertext,
byte[] authenticationTag)
Reconstructs a signed-then-encrypted JWT from components parts of the encrypted JWT string.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
decryptAndVerify(Key decryptionKey,
SigningHandler signingHandler)
Decrypts the outer JWT and then verifies the signature on the inner JWT.
|
JwtClaimsSet |
getClaimsSet()
Gets the claims set object for the Jwt, which contains all of the claims (name value pairs) conveyed by the JWT.
|
boolean |
verify(SigningHandler signingHandler)
Verifies that the signature is valid on the nested signed JWT.
|
build, decrypt, getHeaderpublic SignedThenEncryptedJwt(JweHeader header, SignedJwt payload, Key publicKey)
header - the JWE headers.payload - the signed JWT payload.publicKey - the encryption key.public SignedThenEncryptedJwt(JweHeader header, String encodedHeader, byte[] encryptedContentEncryptionKey, byte[] initialisationVector, byte[] ciphertext, byte[] authenticationTag)
header - the decoded headers.encodedHeader - the encoded headers.encryptedContentEncryptionKey - the encrypted content encryption key (CEK), or null if not used.initialisationVector - the initialisation vector (IV).ciphertext - the encrypted ciphertext payload.authenticationTag - the authentication MAC tag.public boolean verify(SigningHandler signingHandler)
signingHandler - the handler to use for verifying the signature.JwsVerifyingException - if the outer JWT has not already been decrypted.public boolean decryptAndVerify(Key decryptionKey, SigningHandler signingHandler)
decryptionKey - the decryption key for the outer JWE.signingHandler - the signing handler for verifying the nested JWS.JweDecryptionException - if the JWE cannot be decrypted.public JwtClaimsSet getClaimsSet()
JwtgetClaimsSet in interface JwtgetClaimsSet in class EncryptedJwtCopyright © 2025 Open Identity Platform Community. All rights reserved.