Package net.officefloor.web.jwt.jwks
Interface JwksKeyParserContext
public interface JwksKeyParserContext
Context for the
JwksKeyParser.- Author:
- Daniel Sagenschneider
-
Method Summary
Modifier and TypeMethodDescriptiondefault BigIntegergetBase64BigInteger(String fieldName) Convenience method to obtainBigIntegervalue from keyJsonNode.default BigIntegergetBase64BigInteger(tools.jackson.databind.JsonNode node, String fieldName, BigInteger defaultValue) Obtains the fieldBigIntegervalue.default byte[]getBase64Bytes(String fieldName) Convenience method to obtain bytes from keyJsonNode.default byte[]getBase64Bytes(tools.jackson.databind.JsonNode node, String fieldName, byte[] defaultValue) Obtains the field byes.tools.jackson.databind.JsonNodeObtains theJsonNodecontaining theKeyinformation.default StringgetKty()Obtains the key type.default LongConvenience method to obtain long value from keyJsonNode.default LongObtains the field long value.default StringConvenience method to obtain string value from keyJsonNode.default StringObtains the field string value.default <T> TgetValue(tools.jackson.databind.JsonNode node, String fieldName, T defaultValue, Function<tools.jackson.databind.JsonNode, T> getValue) Obtains the field value from theJsonNode.
-
Method Details
-
getKeyNode
tools.jackson.databind.JsonNode getKeyNode()Obtains theJsonNodecontaining theKeyinformation.- Returns:
JsonNodecontaining theKeyinformation.
-
getKty
Obtains the key type.- Returns:
- Key type.
-
getLong
Convenience method to obtain long value from keyJsonNode.- Parameters:
fieldName- Field name.- Returns:
- Long value from key
JsonNodeornull.
-
getLong
Obtains the field long value.- Parameters:
node-JsonNode.fieldName- Field name.defaultValue- Default value.- Returns:
- Field long value.
-
getString
Convenience method to obtain string value from keyJsonNode.- Parameters:
fieldName- Field name.- Returns:
- String value from key
JsonNodeornull.
-
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
Convenience method to obtainBigIntegervalue from keyJsonNode.- Parameters:
fieldName- Field name.- Returns:
BigIntegervalue from keyJsonNodeornull.
-
getBase64BigInteger
default BigInteger getBase64BigInteger(tools.jackson.databind.JsonNode node, String fieldName, BigInteger defaultValue) Obtains the fieldBigIntegervalue.- Parameters:
node-JsonNode.fieldName- Field name.defaultValue- Default value.- Returns:
- Field
BigIntegervalue.
-
getBase64Bytes
Convenience method to obtain bytes from keyJsonNode.- Parameters:
fieldName- Field name.- Returns:
- Bytes from key
JsonNodeornull.
-
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
BigIntegervalue.
-
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 theJsonNode.- Type Parameters:
T- Type of the field value.- Parameters:
node-JsonNode.fieldName- Field name.defaultValue- Default value. May benull.getValue- Obtains the value from theJsonNodefield.- Returns:
- Field value from the
JsonNode.
-