Package org.keycloak.sdjwt
Class SdJwtUtils
java.lang.Object
org.keycloak.sdjwt.SdJwtUtils
- Author:
- Francis Pouatcha
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic final com.fasterxml.jackson.databind.ObjectMapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.node.ArrayNodedecodeDisclosureString(String disclosure) static byte[]decodeNoPad(String encoded) static com.fasterxml.jackson.databind.JsonNodedeepClone(com.fasterxml.jackson.databind.JsonNode node) static StringencodeNoPad(byte[] bytes) static StringhashAndBase64EncodeNoPad(byte[] disclosureBytes, String hashAlg) static StringprintJsonArray(Object[] array) static byte[]randomBytes(int size) static Stringstatic Stringstatic longreadTimeClaim(com.fasterxml.jackson.databind.JsonNode payload, String claimName) static StringrequireNonEmpty(String str, String message)
-
Field Details
-
mapper
public static final com.fasterxml.jackson.databind.ObjectMapper mapper -
arrayEltSpaced
public static boolean arrayEltSpaced
-
-
Constructor Details
-
SdJwtUtils
public SdJwtUtils()
-
-
Method Details
-
encodeNoPad
-
decodeNoPad
-
hashAndBase64EncodeNoPad
-
requireNonEmpty
-
randomSalt
-
randomBytes
public static byte[] randomBytes(int size) -
printJsonArray
public static String printJsonArray(Object[] array) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
decodeDisclosureString
public static com.fasterxml.jackson.databind.node.ArrayNode decodeDisclosureString(String disclosure) throws VerificationException - Throws:
VerificationException
-
readTimeClaim
public static long readTimeClaim(com.fasterxml.jackson.databind.JsonNode payload, String claimName) throws VerificationException - Throws:
VerificationException
-
readClaim
public static String readClaim(com.fasterxml.jackson.databind.JsonNode payload, String claimName) throws VerificationException - Throws:
VerificationException
-
deepClone
public static com.fasterxml.jackson.databind.JsonNode deepClone(com.fasterxml.jackson.databind.JsonNode node)
-