Package com.auth0.jwt.impl
Class JWTParser
- java.lang.Object
-
- com.auth0.jwt.impl.JWTParser
-
- All Implemented Interfaces:
JWTPartsParser
public class JWTParser extends Object implements JWTPartsParser
-
-
Constructor Summary
Constructors Constructor Description JWTParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Header
parseHeader(String json)
Parses the given JSON into a Header instance.Payload
parsePayload(String json)
Parses the given JSON into a Payload instance.
-
-
-
Method Detail
-
parsePayload
public Payload parsePayload(String json) throws JWTDecodeException
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
public Header parseHeader(String json) throws JWTDecodeException
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.
-
-