JsonWebSignature instead@Deprecated public class JsonWebSignature extends JsonWebToken
Sample usage:
public static void printPayload(JsonFactory jsonFactory, String tokenString) throws IOException {
JsonWebSignature jws = JsonWebSignature.parse(jsonFactory, tokenString);
System.out.println(jws.getPayload());
}
Implementation is not thread-safe.
| Modifier and Type | Class and Description |
|---|---|
static class |
JsonWebSignature.Header
Deprecated.
(scheduled to be removed in 1.15) Use
JsonWebSignature.Header instead |
static class |
JsonWebSignature.Parser
Deprecated.
(scheduled to be removed in 1.15) Use
JsonWebSignature.Parser instead |
JsonWebToken.Payload| Constructor and Description |
|---|
JsonWebSignature(JsonWebSignature.Header header,
JsonWebToken.Payload payload,
byte[] signatureBytes,
byte[] signedContentBytes)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
JsonWebSignature.Header |
getHeader()
Deprecated.
Returns the header.
|
byte[] |
getSignatureBytes()
Deprecated.
Returns the bytes of the signature.
|
byte[] |
getSignedContentBytes()
Deprecated.
Returns the bytes of the signature content.
|
static JsonWebSignature |
parse(com.google.api.client.json.JsonFactory jsonFactory,
String tokenString)
Deprecated.
Parses the given JWS token string and returns the parsed
JsonWebSignature. |
static JsonWebSignature.Parser |
parser(com.google.api.client.json.JsonFactory jsonFactory)
Deprecated.
Returns a new instance of a JWS parser.
|
getPayloadpublic JsonWebSignature(JsonWebSignature.Header header, JsonWebToken.Payload payload, byte[] signatureBytes, byte[] signedContentBytes)
header - headerpayload - payloadsignatureBytes - bytes of the signaturesignedContentBytes - bytes of the signature contentpublic JsonWebSignature.Header getHeader()
JsonWebTokenSubclasses may override only to change the return type.
getHeader in class JsonWebTokenpublic final byte[] getSignatureBytes()
public final byte[] getSignedContentBytes()
public static JsonWebSignature parse(com.google.api.client.json.JsonFactory jsonFactory, String tokenString) throws IOException
JsonWebSignature.jsonFactory - JSON factorytokenString - JWS token stringIOExceptionpublic static JsonWebSignature.Parser parser(com.google.api.client.json.JsonFactory jsonFactory)
Copyright © 2011-2013 Google. All Rights Reserved.