Class SdJwtUtils

java.lang.Object
org.keycloak.sdjwt.SdJwtUtils

public class SdJwtUtils extends Object
Author:
Francis Pouatcha
  • 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

      public static String encodeNoPad(byte[] bytes)
    • decodeNoPad

      public static byte[] decodeNoPad(String encoded)
    • hashAndBase64EncodeNoPad

      public static String hashAndBase64EncodeNoPad(byte[] disclosureBytes, String hashAlg)
    • requireNonEmpty

      public static String requireNonEmpty(String str, String message)
    • randomSalt

      public static String 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)