public class DbxAppInfo extends Dumpable
Modifier and Type | Field and Description |
---|---|
static JsonReader<String> |
KeyReader |
static JsonReader<DbxAppInfo> |
Reader |
static JsonReader<String> |
SecretReader |
Constructor and Description |
---|
DbxAppInfo(String key,
String secret) |
DbxAppInfo(String key,
String secret,
DbxHost host) |
Modifier and Type | Method and Description |
---|---|
static void |
checkKeyArg(String key) |
static void |
checkSecretArg(String secret) |
protected void |
dumpFields(DumpWriter out) |
DbxHost |
getHost()
Returns the Dropbox host configuration.
|
String |
getKey()
Returns the Dropbox app key (OAuth calls this the consumer key).
|
static String |
getKeyFormatError(String key)
If they key's format looks correct, return
null . |
String |
getSecret()
Returns the Dropbox app secret (OAuth calls this the consumer secret).
|
static String |
getSecretFormatError(String key)
If they secret's format looks correct, return
null . |
static String |
getTokenPartError(String s) |
getTypeName, toString, toString, toStringMultiline, toStringMultiline
public static final JsonReader<DbxAppInfo> Reader
public static final JsonReader<String> KeyReader
public static final JsonReader<String> SecretReader
public DbxAppInfo(String key, String secret)
key
- Dropbox app key (see getKey()
)secret
- Dropbox app secret (see getSecret()
)public String getKey()
public String getSecret()
Make sure that this is kept a secret. Someone with your app secret can impesonate your application. People sometimes ask for help on the Dropbox API forums and copy/paste their code, which sometimes includes their app secret. Do not do that.
public DbxHost getHost()
This is almost always DbxHost.DEFAULT
. Typically this value will only be
different for testing purposes.
protected void dumpFields(DumpWriter out)
dumpFields
in class Dumpable
public static String getKeyFormatError(String key)
null
. Otherwise return
a string that describes what the problem is.
NOTE: This function only performs some cursory checks on the format of the key.
Even if it returns null
(which means "no problem"), it doesn't mean
that what you passed in is an actual valid Dropbox API app key.
public static String getSecretFormatError(String key)
null
. Otherwise return
a string that describes what the problem is.
NOTE: This function only performs some cursory checks on the format. Even if it
returns null
(which means "no problem"), it doesn't mean that what
you passed in is an actual valid Dropbox API app key.
public static void checkKeyArg(String key)
public static void checkSecretArg(String secret)