public class ApiAppOauth extends AbstractResource
Modifier and Type | Field and Description |
---|---|
static String |
APIAPP_OAUTH_CALLBACK_URL |
static String |
APIAPP_OAUTH_KEY |
static String |
APIAPP_OAUTH_SCOPES |
static String |
APIAPP_OAUTH_SECRET |
dataObj, warnings
Constructor and Description |
---|
ApiAppOauth()
Default constructor.
|
ApiAppOauth(org.json.JSONObject json)
Constructor that instantiates an ApiApp OAuth object based
on the JSON response from the HelloSign API.
|
Modifier and Type | Method and Description |
---|---|
void |
addScope(ApiAppOauthScopeType scope)
Add a scope to this API App's OAuth scope list.
|
void |
clearScopes()
Clear all OAuth scopes for this API App.
|
String |
getCallbackUrl()
The app's OAuth callback URL.
|
Set<ApiAppOauthScopeType> |
getScopes()
Array of OAuth scopes used by the app.
|
String |
getSecret()
The app's OAuth secret.
|
Boolean |
hasCallbackUrl()
True if the OAuth callback is set.
|
void |
removeScope(ApiAppOauthScopeType scope)
Remove the specified OAuth scope from this API App.
|
void |
setCallbackUrl(String url)
Set this API app OAuth callback.
|
void |
setScopes(Set<ApiAppOauthScopeType> scopes)
Set this API app's OAuth scopes.
|
add, addToList, clearList, get, getBoolean, getConstructor, getDate, getInteger, getJSONObject, getList, getList, getLong, getString, getWarnings, has, hasString, set, toString
public static final String APIAPP_OAUTH_KEY
public static final String APIAPP_OAUTH_CALLBACK_URL
public static final String APIAPP_OAUTH_SCOPES
public static final String APIAPP_OAUTH_SECRET
public ApiAppOauth()
public ApiAppOauth(org.json.JSONObject json) throws HelloSignException
json
- JSONObjectHelloSignException
- thrown if there is a problem updating
the OAuth scopes.public String getCallbackUrl()
public Boolean hasCallbackUrl()
public String getSecret()
public Set<ApiAppOauthScopeType> getScopes()
public void setCallbackUrl(String url)
url
- Stringpublic void setScopes(Set<ApiAppOauthScopeType> scopes)
scopes
- Listpublic void addScope(ApiAppOauthScopeType scope)
scope
- ApiAppOauthScopeTypepublic void clearScopes()
public void removeScope(ApiAppOauthScopeType scope)
scope
- ApiAppOauthScopeTypeCopyright © 2016 HelloSign. All rights reserved.