Package com.dropbox.core.oauth
Class DbxRefreshResult
- java.lang.Object
-
- com.dropbox.core.oauth.DbxRefreshResult
-
public class DbxRefreshResult extends java.lang.Object
This is the return value ofDbxCredential.refresh(DbxRequestConfig)
. It contains new access token and expiration time.
-
-
Field Summary
Fields Modifier and Type Field Description static JsonReader<DbxRefreshResult>
Reader
For JSON parsing.
-
Constructor Summary
Constructors Constructor Description DbxRefreshResult(java.lang.String accessToken, long expiresIn)
DbxRefreshResult(java.lang.String accessToken, long expiresIn, java.lang.String scope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAccessToken()
Returns an access token that can be used to make Dropbox API calls.java.lang.Long
getExpiresAt()
Returns the time whenDbxAuthFinish.accessToken
expires in millisecond.java.lang.String
getScope()
-
-
-
Field Detail
-
Reader
public static final JsonReader<DbxRefreshResult> Reader
For JSON parsing.
-
-
Constructor Detail
-
DbxRefreshResult
public DbxRefreshResult(java.lang.String accessToken, long expiresIn)
- Parameters:
accessToken
- OAuth access token.expiresIn
- Duration time of accessToken in second. was passed
-
DbxRefreshResult
public DbxRefreshResult(java.lang.String accessToken, long expiresIn, java.lang.String scope)
- Parameters:
accessToken
- OAuth access token.expiresIn
- Duration time of accessToken in second. was passed
-
-
Method Detail
-
getAccessToken
public java.lang.String getAccessToken()
Returns an access token that can be used to make Dropbox API calls. Pass this in to theDbxClientV2
constructor.- Returns:
- OAuth access token used for authorization with Dropbox servers
-
getExpiresAt
public java.lang.Long getExpiresAt()
Returns the time whenDbxAuthFinish.accessToken
expires in millisecond. If null then it won't expire. Pass this in to theDbxClientV2
constructor.- Returns:
- OAuth access token used for authorization with Dropbox servers
-
getScope
public java.lang.String getScope()
- Returns:
- If you specified a subset of original scope in refresh call, this value shows what permissions the new short lived token has.
-
-