Interface JwksKeyParserContext


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

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default java.math.BigInteger getBase64BigInteger​(com.fasterxml.jackson.databind.JsonNode node, java.lang.String fieldName, java.math.BigInteger defaultValue)
      Obtains the field BigInteger value.
      default java.math.BigInteger getBase64BigInteger​(java.lang.String fieldName)
      Convenience method to obtain BigInteger value from key JsonNode.
      default byte[] getBase64Bytes​(com.fasterxml.jackson.databind.JsonNode node, java.lang.String fieldName, byte[] defaultValue)
      Obtains the field byes.
      default byte[] getBase64Bytes​(java.lang.String fieldName)
      Convenience method to obtain bytes from key JsonNode.
      com.fasterxml.jackson.databind.JsonNode getKeyNode()
      Obtains the JsonNode containing the Key information.
      default java.lang.String getKty()
      Obtains the key type.
      default java.lang.Long getLong​(com.fasterxml.jackson.databind.JsonNode node, java.lang.String fieldName, java.lang.Long defaultValue)
      Obtains the field long value.
      default java.lang.Long getLong​(java.lang.String fieldName)
      Convenience method to obtain long value from key JsonNode.
      default java.lang.String getString​(com.fasterxml.jackson.databind.JsonNode node, java.lang.String fieldName, java.lang.String defaultValue)
      Obtains the field string value.
      default java.lang.String getString​(java.lang.String fieldName)
      Convenience method to obtain string value from key JsonNode.
      default <T> T getValue​(com.fasterxml.jackson.databind.JsonNode node, java.lang.String fieldName, T defaultValue, java.util.function.Function<com.fasterxml.jackson.databind.JsonNode,​T> getValue)
      Obtains the field value from the JsonNode.
    • Method Detail

      • getKeyNode

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

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

        default java.lang.Long getLong​(java.lang.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 java.lang.Long getLong​(com.fasterxml.jackson.databind.JsonNode node,
                                       java.lang.String fieldName,
                                       java.lang.Long defaultValue)
        Obtains the field long value.
        Parameters:
        node - JsonNode.
        fieldName - Field name.
        defaultValue - Default value.
        Returns:
        Field long value.
      • getString

        default java.lang.String getString​(java.lang.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 java.lang.String getString​(com.fasterxml.jackson.databind.JsonNode node,
                                           java.lang.String fieldName,
                                           java.lang.String defaultValue)
        Obtains the field string value.
        Parameters:
        node - JsonNode.
        fieldName - Field name.
        defaultValue - Default value.
        Returns:
        Field string value.
      • getBase64BigInteger

        default java.math.BigInteger getBase64BigInteger​(java.lang.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 java.math.BigInteger getBase64BigInteger​(com.fasterxml.jackson.databind.JsonNode node,
                                                         java.lang.String fieldName,
                                                         java.math.BigInteger defaultValue)
        Obtains the field BigInteger value.
        Parameters:
        node - JsonNode.
        fieldName - Field name.
        defaultValue - Default value.
        Returns:
        Field BigInteger value.
      • getBase64Bytes

        default byte[] getBase64Bytes​(java.lang.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​(com.fasterxml.jackson.databind.JsonNode node,
                                      java.lang.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​(com.fasterxml.jackson.databind.JsonNode node,
                               java.lang.String fieldName,
                               T defaultValue,
                               java.util.function.Function<com.fasterxml.jackson.databind.JsonNode,​T> getValue)
        Obtains the field value from the JsonNode.
        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.