Package com.dropbox.core
Class DbxAuthInfo
- java.lang.Object
-
- com.dropbox.core.DbxAuthInfo
-
public final class DbxAuthInfo extends java.lang.Object
Used by the example code to remember auth information.
-
-
Field Summary
Fields Modifier and Type Field Description static JsonReader<DbxAuthInfo>
Reader
static JsonWriter<DbxAuthInfo>
Writer
-
Constructor Summary
Constructors Constructor Description DbxAuthInfo(java.lang.String accessToken, DbxHost host)
Creates a new instance with the given parameters.DbxAuthInfo(java.lang.String accessToken, java.lang.Long expiresAt, java.lang.String refreshToken, DbxHost host)
Creates a new instance with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAccessToken()
Returns the OAuth access token to use for authorization with Dropbox servers.java.lang.Long
getExpiresAt()
Return the millisecond when accessToken is going to expire.DbxHost
getHost()
Returns Dropbox host configuration used to map requests to the appropriate Dropbox servers.java.lang.String
getRefreshToken()
Return the refresh token which can be used to obtain new access token.
-
-
-
Field Detail
-
Reader
public static final JsonReader<DbxAuthInfo> Reader
-
Writer
public static final JsonWriter<DbxAuthInfo> Writer
-
-
Constructor Detail
-
DbxAuthInfo
public DbxAuthInfo(java.lang.String accessToken, DbxHost host)
Creates a new instance with the given parameters.- Parameters:
accessToken
- OAuth access token for authorization with Dropbox servershost
- Dropbox host configuration used to select Dropbox servers
-
DbxAuthInfo
public DbxAuthInfo(java.lang.String accessToken, java.lang.Long expiresAt, java.lang.String refreshToken, DbxHost host)
Creates a new instance with the given parameters.- Parameters:
accessToken
- OAuth access token for authorization with Dropbox serversexpiresAt
- When accessToken is going to expire in millisecondrefreshToken
- Refresh token which can bu used to obtain new accessTokenhost
- Dropbox host configuration used to select Dropbox servers
-
-
Method Detail
-
getAccessToken
public java.lang.String getAccessToken()
Returns the OAuth access token to use for authorization with Dropbox servers.- Returns:
- OAuth access token
-
getExpiresAt
public java.lang.Long getExpiresAt()
Return the millisecond when accessToken is going to expire.- Returns:
- ExpiresAt in millisecond.
-
getRefreshToken
public java.lang.String getRefreshToken()
Return the refresh token which can be used to obtain new access token.- Returns:
- Refresh Token.
-
getHost
public DbxHost getHost()
Returns Dropbox host configuration used to map requests to the appropriate Dropbox servers.- Returns:
- Dropbox host configuration
-
-