Package org.keycloak.sdjwt
Class SdJwtUtils
java.lang.Object
org.keycloak.sdjwt.SdJwtUtils
- Author:
- Francis Pouatcha
-
Field Summary
Modifier and TypeFieldDescriptionstatic boolean
static final com.fasterxml.jackson.databind.ObjectMapper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.node.ArrayNode
decodeDisclosureString
(String disclosure) static byte[]
decodeNoPad
(String encoded) static com.fasterxml.jackson.databind.JsonNode
deepClone
(com.fasterxml.jackson.databind.JsonNode node) static String
encodeNoPad
(byte[] bytes) static String
hashAndBase64EncodeNoPad
(byte[] disclosureBytes, String hashAlg) static String
printJsonArray
(Object[] array) static byte[]
randomBytes
(int size) static String
static String
static long
readTimeClaim
(com.fasterxml.jackson.databind.JsonNode payload, String claimName) static String
requireNonEmpty
(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)
-