Package org.keycloak.sdjwt
Class IssuerSignedJWT
java.lang.Object
org.keycloak.sdjwt.JwsToken
org.keycloak.sdjwt.IssuerSignedJWT
Handle verifiable credentials (SD-JWT VC), enabling the parsing of existing VCs as well as the creation and signing
of new ones. It integrates with Keycloak's SignatureSignerContext to facilitate the generation of issuer signature.
- Author:
- Francis Pouatcha
-
Nested Class Summary
Nested Classes -
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionIssuerSignedJWT(String jwsString) IssuerSignedJWT(JWSHeader jwsHeader, com.fasterxml.jackson.databind.node.ObjectNode payload) protectedIssuerSignedJWT(DisclosureSpec disclosureSpec, JWSHeader jwsHeader, List<SdJwtClaim> disclosureClaims, List<DecoyClaim> decoyClaims, String hashAlg, boolean nestedDisclosures) protectedIssuerSignedJWT(DisclosureSpec disclosureSpec, JWSHeader jwsHeader, List<SdJwtClaim> disclosureClaims, List<DecoyClaim> decoyClaims, String hashAlg, boolean nestedDisclosures, SignatureSignerContext signer) -
Method Summary
Modifier and TypeMethodDescriptionstatic IssuerSignedJWT.Builderbuilder()Optional<com.fasterxml.jackson.databind.JsonNode>Returns `cnf` claim (establishing key binding)Returns declared hash algorithm from SD hash claim.voidsetDisclosureClaims(DisclosureSpec disclosureSpec, List<SdJwtClaim> disclosureClaims, List<DecoyClaim> decoyClaims) voidsetDisclosureClaims(DisclosureSpec disclosureSpec, List<SdJwtClaim> disclosureClaims, List<DecoyClaim> decoyClaims, SignatureSignerContext signatureSignerContext) voidVerifies that the SD hash algorithm is understood and deemed secure.Methods inherited from class org.keycloak.sdjwt.JwsToken
getJws, getJwsHeader, getJwsHeaderAsNode, getJwsInput, getPayload, getSdHashAlgorithm, setJws, setJwsHeader, setJwsInput, setPayload, sign, verifySignature
-
Constructor Details
-
IssuerSignedJWT
-
IssuerSignedJWT
-
IssuerSignedJWT
protected IssuerSignedJWT(DisclosureSpec disclosureSpec, JWSHeader jwsHeader, List<SdJwtClaim> disclosureClaims, List<DecoyClaim> decoyClaims, String hashAlg, boolean nestedDisclosures) -
IssuerSignedJWT
protected IssuerSignedJWT(DisclosureSpec disclosureSpec, JWSHeader jwsHeader, List<SdJwtClaim> disclosureClaims, List<DecoyClaim> decoyClaims, String hashAlg, boolean nestedDisclosures, SignatureSignerContext signer)
-
-
Method Details
-
getCnfClaim
Returns `cnf` claim (establishing key binding) -
getSdHashAlg
Returns declared hash algorithm from SD hash claim. -
verifySdHashAlgorithm
Verifies that the SD hash algorithm is understood and deemed secure.- Throws:
VerificationException- if not
-
getDisclosureSpec
-
getDisclosureClaims
-
getDecoyClaims
-
setDisclosureClaims
public void setDisclosureClaims(DisclosureSpec disclosureSpec, List<SdJwtClaim> disclosureClaims, List<DecoyClaim> decoyClaims) -
setDisclosureClaims
public void setDisclosureClaims(DisclosureSpec disclosureSpec, List<SdJwtClaim> disclosureClaims, List<DecoyClaim> decoyClaims, SignatureSignerContext signatureSignerContext) -
builder
-