Package net.officefloor.web.jwt.jwks
Interface JwksKeyParserContext
-
public interface JwksKeyParserContext
Context for theJwksKeyParser
.- 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 fieldBigInteger
value.default java.math.BigInteger
getBase64BigInteger(java.lang.String fieldName)
Convenience method to obtainBigInteger
value from keyJsonNode
.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 keyJsonNode
.com.fasterxml.jackson.databind.JsonNode
getKeyNode()
Obtains theJsonNode
containing theKey
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 keyJsonNode
.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 keyJsonNode
.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 theJsonNode
.
-
-
-
Method Detail
-
getKeyNode
com.fasterxml.jackson.databind.JsonNode getKeyNode()
Obtains theJsonNode
containing theKey
information.- Returns:
JsonNode
containing theKey
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 keyJsonNode
.- Parameters:
fieldName
- Field name.- Returns:
- Long value from key
JsonNode
ornull
.
-
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 keyJsonNode
.- Parameters:
fieldName
- Field name.- Returns:
- String value from key
JsonNode
ornull
.
-
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 obtainBigInteger
value from keyJsonNode
.- Parameters:
fieldName
- Field name.- Returns:
BigInteger
value from keyJsonNode
ornull
.
-
getBase64BigInteger
default java.math.BigInteger getBase64BigInteger(com.fasterxml.jackson.databind.JsonNode node, java.lang.String fieldName, java.math.BigInteger defaultValue)
Obtains the fieldBigInteger
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 keyJsonNode
.- Parameters:
fieldName
- Field name.- Returns:
- Bytes from key
JsonNode
ornull
.
-
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 theJsonNode
.- Parameters:
node
-JsonNode
.fieldName
- Field name.defaultValue
- Default value. May benull
.getValue
- Obtains the value from theJsonNode
field.- Returns:
- Field value from the
JsonNode
.
-
-