public class EncryptedThenSignedJwt extends SignedJwt
SignedJwt
,
EncryptedJwt
Constructor and Description |
---|
EncryptedThenSignedJwt(JwsHeader header,
EncryptedJwt nestedJwe,
byte[] signingInput,
byte[] signature)
Constructs a reconstructed SignedEncryptedJwt from its constituent parts, the JwsHeader, nested Encrypted JWT,
signing input and signature.
|
EncryptedThenSignedJwt(JwsHeader header,
EncryptedJwt nestedJwe,
SigningHandler signingHandler)
Constructs a fresh, new SignedEncryptedJwt from the given JwsHeader and nested Encrypted JWT.
|
Modifier and Type | Method and Description |
---|---|
EncryptedThenSignedJwt |
copy()
Create a copy of the current payload.
|
void |
decrypt(Key privateKey)
Decrypts the JWE so that it Claims Set can be accessed.
|
JwtClaimsSet |
getClaimsSet()
Gets the claims set object for the nested Encrypted JWT that is the payload of this JWS.
|
JweHeader |
getJweHeader()
Get the header of the encapsulated
EncryptedJwt . |
build, getHeader, getPayload, verify
public EncryptedThenSignedJwt(JwsHeader header, EncryptedJwt nestedJwe, SigningHandler signingHandler)
The specified private key will be used in the creation of the JWS signature.
header
- The JwsHeader containing the header parameters of the JWS.nestedJwe
- The nested Encrypted JWT that will be the payload of this JWS.signingHandler
- The SigningHandler instance used to sign the JWS.public EncryptedThenSignedJwt(JwsHeader header, EncryptedJwt nestedJwe, byte[] signingInput, byte[] signature)
For use when a signed nested encrypted JWT has been reconstructed from its base64url encoded string representation and the signature needs verifying.
header
- The JwsHeader containing the header parameters of the JWS.nestedJwe
- The nested Encrypted JWT that is the payload of the JWS.signingInput
- The original data that was signed, being the base64url encoding of the JWS header and
payload concatenated using a "." character.signature
- The resulting signature of signing the signing input.public JwtClaimsSet getClaimsSet()
getClaimsSet
in interface Jwt
getClaimsSet
in class SignedJwt
Jwt.getClaimsSet()
public void decrypt(Key privateKey)
The same private key must be given here that is the pair to the public key that was used to encrypt the JWT.
privateKey
- The private key pair to the public key that encrypted the JWT.public JweHeader getJweHeader()
EncryptedJwt
.Copyright © 2010-2018, ForgeRock All Rights Reserved.