Package com.auth0.jwt.impl
Class JWTParser
java.lang.Object
com.auth0.jwt.impl.JWTParser
- All Implemented Interfaces:
JWTPartsParser
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.fasterxml.jackson.databind.ObjectReader
private final com.fasterxml.jackson.databind.ObjectReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addDeserializers
(com.fasterxml.jackson.databind.ObjectMapper mapper) private static JWTDecodeException
private static JWTDecodeException
decodeException
(String json) (package private) static com.fasterxml.jackson.databind.ObjectMapper
parseHeader
(String json) Parses the given JSON into a Header instance.parsePayload
(String json) Parses the given JSON into a Payload instance.
-
Field Details
-
payloadReader
private final com.fasterxml.jackson.databind.ObjectReader payloadReader -
headerReader
private final com.fasterxml.jackson.databind.ObjectReader headerReader
-
-
Constructor Details
-
JWTParser
public JWTParser() -
JWTParser
JWTParser(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
-
Method Details
-
parsePayload
Description copied from interface:JWTPartsParser
Parses the given JSON into a Payload instance.- Specified by:
parsePayload
in interfaceJWTPartsParser
- Parameters:
json
- the content of the Payload in a JSON representation.- Returns:
- the Payload.
- Throws:
JWTDecodeException
- if the json doesn't have a proper JSON format.
-
parseHeader
Description copied from interface:JWTPartsParser
Parses the given JSON into a Header instance.- Specified by:
parseHeader
in interfaceJWTPartsParser
- Parameters:
json
- the content of the Header in a JSON representation.- Returns:
- the Header.
- Throws:
JWTDecodeException
- if the json doesn't have a proper JSON format.
-
addDeserializers
private void addDeserializers(com.fasterxml.jackson.databind.ObjectMapper mapper) -
getDefaultObjectMapper
static com.fasterxml.jackson.databind.ObjectMapper getDefaultObjectMapper() -
decodeException
-
decodeException
-