Package org.forgerock.openig.fapi.jwt
Class OctetSequenceSignedJwt
java.lang.Object
org.forgerock.json.jose.jws.SignedJwt
org.forgerock.openig.fapi.jwt.OctetSequenceSignedJwt
Extension of
SignedJwt
supporting octet-sequence payloads represented by a OctetSequencePayload
.-
Constructor Summary
ConstructorsModifierConstructorDescriptionOctetSequenceSignedJwt
(JwsHeader header, OctetSequencePayload nestedPayload, byte[] signingInput, byte[] signature) Constructs a reconstructedOctetSequenceSignedJwt
from its constituent parts, the JwsHeader, nested Encrypted JWT, signing input and signature.OctetSequenceSignedJwt
(JwsHeader header, OctetSequencePayload nestedPayload, SigningHandler signingHandler) Constructs a fresh, newOctetSequenceSignedJwt
from the givenJwsHeader
and nested Encrypted JWT.protected
OctetSequenceSignedJwt
(OctetSequenceSignedJwt signedJwt) Construct anOctetSequenceSignedJwt
from an existent one. -
Method Summary
Modifier and TypeMethodDescriptionGets the claims set object for the Jwt, which contains all of the claims (name value pairs) conveyed by the JWT.Gets the payload for the JWS, which will either be a JWT Claims Set,SignedJwt.getClaimsSet()
, or a nested EncryptedJwt,EncryptedJwt
.
-
Constructor Details
-
OctetSequenceSignedJwt
Construct anOctetSequenceSignedJwt
from an existent one.- Parameters:
signedJwt
- the signed JWT
-
OctetSequenceSignedJwt
public OctetSequenceSignedJwt(JwsHeader header, OctetSequencePayload nestedPayload, SigningHandler signingHandler) Constructs a fresh, newOctetSequenceSignedJwt
from the givenJwsHeader
and nested Encrypted JWT.The specified private key will be used in the creation of the JWS signature.
- Parameters:
header
- The JwsHeader containing the header parameters of the JWS.nestedPayload
- The nestedOctetSequencePayload
that will be the payload of this JWS.signingHandler
- The SigningHandler instance used to sign the JWS.
-
OctetSequenceSignedJwt
public OctetSequenceSignedJwt(JwsHeader header, OctetSequencePayload nestedPayload, byte[] signingInput, byte[] signature) Constructs a reconstructedOctetSequenceSignedJwt
from its constituent parts, the JwsHeader, nested Encrypted JWT, signing input and signature.For use when a signed nested encrypted JWT has been reconstructed from its base64url encoded string representation and the signature needs verifying.
- Parameters:
header
- The JwsHeader containing the header parameters of the JWS.nestedPayload
- The nestedOctetSequencePayload
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.
-
-
Method Details
-
getPayload
Description copied from class:SignedJwt
Gets the payload for the JWS, which will either be a JWT Claims Set,SignedJwt.getClaimsSet()
, or a nested EncryptedJwt,EncryptedJwt
.- Overrides:
getPayload
in classSignedJwt
- Returns:
- The JWS' payload.
- See Also:
-
getClaimsSet
Description copied from interface:Jwt
Gets the claims set object for the Jwt, which contains all of the claims (name value pairs) conveyed by the JWT.- Specified by:
getClaimsSet
in interfaceJwt
- Overrides:
getClaimsSet
in classSignedJwt
- Returns:
- The JWTs Claims Set.
-