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
This class helps in decoding the Header and Payload of the JWT usingHeaderSerializerandPayloadSerializer.
-
-
Constructor Summary
Constructors Constructor Description JWTParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HeaderparseHeader(java.lang.String json)Parses the given JSON into aHeaderinstance.PayloadparsePayload(java.lang.String json)Parses the given JSON into aPayloadinstance.
-
-
-
Method Detail
-
parsePayload
public Payload parsePayload(java.lang.String json) throws JWTDecodeException
Description copied from interface:JWTPartsParserParses the given JSON into aPayloadinstance.- 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 aHeaderinstance.- 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.
-
-