|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.auth.jsontoken.JsonWebToken
com.google.api.client.auth.jsontoken.JsonWebSignature
public class JsonWebSignature
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.
| Nested Class Summary | |
|---|---|
static class |
JsonWebSignature.Header
Header as specified in Reserved Header Parameter Names. |
static class |
JsonWebSignature.Parser
JWS parser. |
| Nested classes/interfaces inherited from class com.google.api.client.auth.jsontoken.JsonWebToken |
|---|
JsonWebToken.Payload |
| Constructor Summary | |
|---|---|
JsonWebSignature(JsonWebSignature.Header header,
JsonWebToken.Payload payload,
byte[] signatureBytes,
byte[] signedContentBytes)
|
|
| Method Summary | |
|---|---|
JsonWebSignature.Header |
getHeader()
Returns the header. |
byte[] |
getSignatureBytes()
Returns the bytes of the signature. |
byte[] |
getSignedContentBytes()
Returns the bytes of the signature content. |
static JsonWebSignature |
parse(JsonFactory jsonFactory,
String tokenString)
Parses the given JWS token string and returns the parsed JsonWebSignature. |
static JsonWebSignature.Parser |
parser(JsonFactory jsonFactory)
Returns a new instance of a JWS parser. |
| Methods inherited from class com.google.api.client.auth.jsontoken.JsonWebToken |
|---|
getPayload |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JsonWebSignature(JsonWebSignature.Header header,
JsonWebToken.Payload payload,
byte[] signatureBytes,
byte[] signedContentBytes)
header - headerpayload - payloadsignatureBytes - bytes of the signaturesignedContentBytes - bytes of the signature content| Method Detail |
|---|
public 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(JsonFactory jsonFactory,
String tokenString)
throws IOException
JsonWebSignature.
jsonFactory - JSON factorytokenString - JWS token string
IOExceptionpublic static JsonWebSignature.Parser parser(JsonFactory jsonFactory)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||