Package com.auth0.jwt.impl
Class JWTParser
- java.lang.Object
-
- com.auth0.jwt.impl.JWTParser
-
- All Implemented Interfaces:
JWTPartsParser
public class JWTParser extends java.lang.Object implements JWTPartsParser
-
-
Field Summary
Fields Modifier and Type Field Description private com.fasterxml.jackson.databind.ObjectReaderheaderReaderprivate com.fasterxml.jackson.databind.ObjectReaderpayloadReader
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddDeserializers(com.fasterxml.jackson.databind.ObjectMapper mapper)private static JWTDecodeExceptiondecodeException()private static JWTDecodeExceptiondecodeException(java.lang.String json)(package private) static com.fasterxml.jackson.databind.ObjectMappergetDefaultObjectMapper()HeaderparseHeader(java.lang.String json)Parses the given JSON into a Header instance.PayloadparsePayload(java.lang.String json)Parses the given JSON into a Payload instance.
-
-
-
Method Detail
-
parsePayload
public Payload parsePayload(java.lang.String json) throws JWTDecodeException
Description copied from interface:JWTPartsParserParses the given JSON into a Payload instance.- Specified by:
parsePayloadin 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
public Header parseHeader(java.lang.String json) throws JWTDecodeException
Description copied from interface:JWTPartsParserParses the given JSON into a Header instance.- Specified by:
parseHeaderin 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
private static JWTDecodeException decodeException()
-
decodeException
private static JWTDecodeException decodeException(java.lang.String json)
-
-