Package org.keycloak.sdjwt
Class SdJwtFacade
java.lang.Object
org.keycloak.sdjwt.SdJwtFacade
Simplified service for creating and managing SD-JWTs with easy-to-use methods.
- Author:
- Rodrick Awambeng
-
Constructor Summary
ConstructorDescriptionSdJwtFacade
(SignatureSignerContext signer, String hashAlgorithm, String jwsType) -
Method Summary
Modifier and TypeMethodDescriptioncreateSdJwt
(com.fasterxml.jackson.databind.JsonNode claimSet, DisclosureSpec disclosureSpec) Create a new SD-JWT with the provided claim set and disclosure specification.getSdJwtString
(SdJwt sdJwt) Retrieve the SD-JWT as a string representation.void
verifySdJwt
(SdJwt sdJwt, List<SignatureVerifierContext> issuerVerifyingKeys, IssuerSignedJwtVerificationOpts verificationOpts) Verify the SD-JWT using the provided signature verification keys.
-
Constructor Details
-
SdJwtFacade
-
-
Method Details
-
createSdJwt
public SdJwt createSdJwt(com.fasterxml.jackson.databind.JsonNode claimSet, DisclosureSpec disclosureSpec) Create a new SD-JWT with the provided claim set and disclosure specification.- Parameters:
claimSet
- The claim set in JSON format.disclosureSpec
- The disclosure specification.- Returns:
- A new SD-JWT.
-
verifySdJwt
public void verifySdJwt(SdJwt sdJwt, List<SignatureVerifierContext> issuerVerifyingKeys, IssuerSignedJwtVerificationOpts verificationOpts) throws VerificationException Verify the SD-JWT using the provided signature verification keys.- Parameters:
sdJwt
- The SD-JWT to verify.issuerVerifyingKeys
- List of issuer verifying keys.verificationOpts
- Options for verification.- Throws:
VerificationException
- if verification fails.
-
getSdJwtString
Retrieve the SD-JWT as a string representation.- Parameters:
sdJwt
- The SD-JWT to convert.- Returns:
- The string representation of the SD-JWT.
-