Package org.keycloak.sdjwt
Class SdJws
java.lang.Object
org.keycloak.sdjwt.SdJws
- Direct Known Subclasses:
- IssuerSignedJWT,- KeyBindingJWT
Handle jws, either the issuer jwt or the holder key binding jwt.
- Author:
- Francis Pouatcha
- 
Field SummaryFields
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedSdJws(com.fasterxml.jackson.databind.JsonNode payload) protectedSdJws(com.fasterxml.jackson.databind.JsonNode payload, SignatureSignerContext signer, String jwsType) protectedprotected
- 
Method SummaryModifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.JsonNodeprotected static JWSInputsign(com.fasterxml.jackson.databind.JsonNode payload, SignatureSignerContext signer, String jwsType) toJws()voidverifyAge(int maxAge) Verifies that the JWS is not too old.voidvoidverifyIssClaim(List<String> issuers) Verifies that SD-JWT was issued by one of the provided issuers.voidvoidvoidverifySignature(SignatureVerifierContext verifier) voidverifyVctClaim(List<String> vcts) Verifies that SD-JWT vct claim matches the expected one.
- 
Field Details- 
CLAIM_NAME_ISSUER- See Also:
 
 
- 
- 
Constructor Details- 
SdJwsprotected SdJws(com.fasterxml.jackson.databind.JsonNode payload) 
- 
SdJws
- 
SdJws
- 
SdJwsprotected SdJws(com.fasterxml.jackson.databind.JsonNode payload, SignatureSignerContext signer, String jwsType) 
 
- 
- 
Method Details- 
toJws
- 
getPayloadpublic com.fasterxml.jackson.databind.JsonNode getPayload()
- 
signprotected static JWSInput sign(com.fasterxml.jackson.databind.JsonNode payload, SignatureSignerContext signer, String jwsType) 
- 
verifySignature- Throws:
- VerificationException
 
- 
getHeader
- 
verifyIssuedAtClaim- Throws:
- VerificationException
 
- 
verifyExpClaim- Throws:
- VerificationException
 
- 
verifyNotBeforeClaim- Throws:
- VerificationException
 
- 
verifyAgeVerifies that the JWS is not too old.- Parameters:
- maxAge- Maximum age in seconds
- Throws:
- VerificationException- if too old
 
- 
verifyIssClaimVerifies that SD-JWT was issued by one of the provided issuers.- Parameters:
- issuers- List of trusted issuers
- Throws:
- VerificationException
 
- 
verifyVctClaimVerifies that SD-JWT vct claim matches the expected one.- Parameters:
- vcts- list of supported verifiable credential types
- Throws:
- VerificationException
 
 
-