public class AccessTokenMAC extends AccessToken
Modifier and Type | Field and Description |
---|---|
java.lang.String |
mac_algorithm
The MAC algorithm used to calculate the request MAC.
|
java.lang.String |
mac_key
The MAC key
|
long |
timestamp
The time when the credentials were issued
|
access_token, expires_in, refresh_token, scope, token_type
Constructor and Description |
---|
AccessTokenMAC(java.io.DataInputStream in)
creates a token that was serialized before into a stream.
|
Modifier and Type | Method and Description |
---|---|
void |
serialize(java.io.DataOutputStream out)
The method allows user to save a token in some storage
|
toString, writeStringOrNull
public final java.lang.String mac_key
public final java.lang.String mac_algorithm
"hmac-sha-1"
and "hmac-sha-256"
.public final long timestamp
public AccessTokenMAC(java.io.DataInputStream in) throws java.io.IOException
in
- Stream from that the token can be restoredjava.io.IOException
- thrown if IO error occurs or
data in the stream has wrong formatpublic void serialize(java.io.DataOutputStream out) throws java.io.IOException
Token
serialize
in interface Token
serialize
in class AccessToken
out
- output stream for token's datajava.io.IOException
- in case of errors in the serialize operationCopyright © 2013, 2014, Oracle and/or its affiliates. All rights reserved.