public static final class JsonWebSignature.Parser
JWS parser.
Implementation is not thread-safe.
Constructors
Parser(JsonFactory jsonFactory)
public Parser(JsonFactory jsonFactory)
Name | Description |
jsonFactory | JsonFactory JSON factory |
Methods
getHeaderClass()
public Class<? extends JsonWebSignature.Header> getHeaderClass()
Returns the header class to use for parsing.
Type | Description |
Class<? extends com.google.api.client.json.webtoken.JsonWebSignature.Header> |
getJsonFactory()
public JsonFactory getJsonFactory()
Returns the JSON factory.
Type | Description |
JsonFactory |
getPayloadClass()
public Class<? extends JsonWebToken.Payload> getPayloadClass()
Returns the payload class to use for parsing.
Type | Description |
Class<? extends com.google.api.client.json.webtoken.JsonWebToken.Payload> |
parse(String tokenString)
public JsonWebSignature parse(String tokenString)
Parses a JWS token into a parsed JsonWebSignature.
Name | Description |
tokenString | String JWS token string |
Type | Description |
JsonWebSignature | parsed JsonWebSignature |
Type | Description |
IOException |
setHeaderClass(Class<? extends JsonWebSignature.Header> headerClass)
public JsonWebSignature.Parser setHeaderClass(Class<? extends JsonWebSignature.Header> headerClass)
Sets the header class to use for parsing.
Name | Description |
headerClass | Class<? extends com.google.api.client.json.webtoken.JsonWebSignature.Header> |
Type | Description |
JsonWebSignature.Parser |
setPayloadClass(Class<? extends JsonWebToken.Payload> payloadClass)
public JsonWebSignature.Parser setPayloadClass(Class<? extends JsonWebToken.Payload> payloadClass)
Sets the payload class to use for parsing.
Name | Description |
payloadClass | Class<? extends com.google.api.client.json.webtoken.JsonWebToken.Payload> |
Type | Description |
JsonWebSignature.Parser |