Interface JwksKeyParserContext


public interface JwksKeyParserContext
Context for the JwksKeyParser.
Author:
Daniel Sagenschneider
  • Method Summary

    Modifier and Type
    Method
    Description
    default BigInteger
    Convenience method to obtain BigInteger value from key JsonNode.
    default BigInteger
    getBase64BigInteger(tools.jackson.databind.JsonNode node, String fieldName, BigInteger defaultValue)
    Obtains the field BigInteger value.
    default byte[]
    Convenience method to obtain bytes from key JsonNode.
    default byte[]
    getBase64Bytes(tools.jackson.databind.JsonNode node, String fieldName, byte[] defaultValue)
    Obtains the field byes.
    tools.jackson.databind.JsonNode
    Obtains the JsonNode containing the Key information.
    default String
    Obtains the key type.
    default Long
    getLong(String fieldName)
    Convenience method to obtain long value from key JsonNode.
    default Long
    getLong(tools.jackson.databind.JsonNode node, String fieldName, Long defaultValue)
    Obtains the field long value.
    default String
    getString(String fieldName)
    Convenience method to obtain string value from key JsonNode.
    default String
    getString(tools.jackson.databind.JsonNode node, String fieldName, String defaultValue)
    Obtains the field string value.
    default <T> T
    getValue(tools.jackson.databind.JsonNode node, String fieldName, T defaultValue, Function<tools.jackson.databind.JsonNode,T> getValue)
    Obtains the field value from the JsonNode.
  • Method Details

    • getKeyNode

      tools.jackson.databind.JsonNode getKeyNode()
      Obtains the JsonNode containing the Key information.
      Returns:
      JsonNode containing the Key information.
    • getKty

      default String getKty()
      Obtains the key type.
      Returns:
      Key type.
    • getLong

      default Long getLong(String fieldName)
      Convenience method to obtain long value from key JsonNode.
      Parameters:
      fieldName - Field name.
      Returns:
      Long value from key JsonNode or null.
    • getLong

      default Long getLong(tools.jackson.databind.JsonNode node, String fieldName, Long defaultValue)
      Obtains the field long value.
      Parameters:
      node - JsonNode.
      fieldName - Field name.
      defaultValue - Default value.
      Returns:
      Field long value.
    • getString

      default String getString(String fieldName)
      Convenience method to obtain string value from key JsonNode.
      Parameters:
      fieldName - Field name.
      Returns:
      String value from key JsonNode or null.
    • getString

      default String getString(tools.jackson.databind.JsonNode node, String fieldName, String defaultValue)
      Obtains the field string value.
      Parameters:
      node - JsonNode.
      fieldName - Field name.
      defaultValue - Default value.
      Returns:
      Field string value.
    • getBase64BigInteger

      default BigInteger getBase64BigInteger(String fieldName)
      Convenience method to obtain BigInteger value from key JsonNode.
      Parameters:
      fieldName - Field name.
      Returns:
      BigInteger value from key JsonNode or null.
    • getBase64BigInteger

      default BigInteger getBase64BigInteger(tools.jackson.databind.JsonNode node, String fieldName, BigInteger defaultValue)
      Obtains the field BigInteger value.
      Parameters:
      node - JsonNode.
      fieldName - Field name.
      defaultValue - Default value.
      Returns:
      Field BigInteger value.
    • getBase64Bytes

      default byte[] getBase64Bytes(String fieldName)
      Convenience method to obtain bytes from key JsonNode.
      Parameters:
      fieldName - Field name.
      Returns:
      Bytes from key JsonNode or null.
    • getBase64Bytes

      default byte[] getBase64Bytes(tools.jackson.databind.JsonNode node, String fieldName, byte[] defaultValue)
      Obtains the field byes.
      Parameters:
      node - JsonNode.
      fieldName - Field name.
      defaultValue - Default value.
      Returns:
      Field BigInteger value.
    • getValue

      default <T> T getValue(tools.jackson.databind.JsonNode node, String fieldName, T defaultValue, Function<tools.jackson.databind.JsonNode,T> getValue)
      Obtains the field value from the JsonNode.
      Type Parameters:
      T - Type of the field value.
      Parameters:
      node - JsonNode.
      fieldName - Field name.
      defaultValue - Default value. May be null.
      getValue - Obtains the value from the JsonNode field.
      Returns:
      Field value from the JsonNode.