public class AccessToken extends Object implements android.os.Parcelable
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<AccessToken> |
CREATOR
CREATER required by
Parcelable interface. |
Constructor and Description |
---|
AccessToken()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
String |
getAccessToken()
Get the access token (= the value of
access_token
(REQUIRED parameter)). |
int |
getExpiresIn()
Get the lifetime of the access token in seconds (= the value of
expires_in parameter (RECOMMENDED parameter)). |
String |
getRefreshToken()
Get the refresh token (= the value of
refresh_token parameter
(OPTIONAL parameter)). |
String |
getScope()
Get the space-delimited scope list (= the value of
scope
parameter (OPTIONAL parameter)). |
String |
getTokenType()
Get the token type (= the value of
token_type
(REQUIRED parameter)). |
AccessToken |
setAccessToken(String accessToken)
Set the access token (= the value of
access_token
(REQUIRED parameter)). |
AccessToken |
setExpiresIn(int expiresIn)
Set the lifetime of the access token in seconds (= the value of
expires_in parameter (RECOMMENDED parameter)). |
AccessToken |
setRefreshToken(String refreshToken)
Set the refresh token (= the value of
refresh_token parameter
(OPTIONAL parameter)). |
AccessToken |
setScope(String scope)
Set the space-delimited scope list (= the value of
scope
parameter (OPTIONAL parameter)). |
AccessToken |
setTokenType(String tokenType)
Set the token type (= the value of
token_type
(REQUIRED parameter)). |
void |
writeToParcel(android.os.Parcel out,
int flags) |
public static final android.os.Parcelable.Creator<AccessToken> CREATOR
Parcelable
interface.public String getAccessToken()
access_token
(REQUIRED parameter)).public AccessToken setAccessToken(String accessToken)
access_token
(REQUIRED parameter)).accessToken
- The access token.this
object.public String getTokenType()
token_type
(REQUIRED parameter)).public AccessToken setTokenType(String tokenType)
token_type
(REQUIRED parameter)).tokenType
- The token type.this
object.public int getExpiresIn()
expires_in
parameter (RECOMMENDED parameter)).public AccessToken setExpiresIn(int expiresIn)
expires_in
parameter (RECOMMENDED parameter)).expiresIn
- The lifetime of the access token in seconds.this
object.public String getRefreshToken()
refresh_token
parameter
(OPTIONAL parameter)).null
may be returned when
the value is not available.public AccessToken setRefreshToken(String refreshToken)
refresh_token
parameter
(OPTIONAL parameter)).refreshToken
- The refresh token.this
object.public String getScope()
scope
parameter (OPTIONAL parameter)).
RFC 6749 (OAuth 2.0), 3.3. Access Token Scope says
"The value of the scope parameter is expressed as a list of
space-delimited, case-sensitive strings."
However, Facebook does not comply with this specification
and uses a comma (0x2C) as the delimiter. Therefore, this
method returns a comma-delimited scope list if this
AccessToken
instance was built from a response from
Facebook.
public AccessToken setScope(String scope)
scope
parameter (OPTIONAL parameter)).scope
- The space-delimited scope list.this
object.public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel out, int flags)
writeToParcel
in interface android.os.Parcelable
Copyright © 2016. All rights reserved.