public class BoxTransactionalAPIConnection extends BoxAPIConnection
This class handles everything for transactional API that isn't already handled by BoxAPIConnection.
BoxAPIConnection.ResourceLinkTypeDEFAULT_BASE_AUTHORIZATION_URL, DEFAULT_HOSTNAME_VERIFIER, DEFAULT_MAX_RETRIES, DEFAULT_TRUST_MANAGER| Constructor and Description |
|---|
BoxTransactionalAPIConnection(String accessToken)
Constructs a new BoxTransactionalAPIConnection that authenticates with an access token.
|
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate(String authCode)
Disabling the non-Box Developer Edition authenticate method.
|
boolean |
canRefresh()
BoxTransactionalAPIConnection can never refresh.
|
static BoxAPIConnection |
getTransactionConnection(String accessToken,
String scope)
Request a scoped transactional token.
|
static BoxAPIConnection |
getTransactionConnection(String accessToken,
String scope,
String resource)
Request a scoped transactional token for a particular resource.
|
void |
refresh()
Transactional auth does not support token refreshes.
|
void |
setAutoRefresh(boolean autoRefresh)
Auto refresh is not available for transactional auth.
|
addListener, asSelf, asUser, configureSslCertificatesValidation, createNewCall, createTokenRequest, determineResourceLinkType, enableNotifications, extractTokens, getAccessToken, getAuthorizationURL, getAuthorizationURL, getAutoRefresh, getBaseAppUrl, getBaseUploadURL, getBaseURL, getClientID, getClientSecret, getConnectTimeout, getExpires, getHostnameVerifier, getKeyValueOrDefault, getLastRefresh, getLowerScopedToken, getMaxRetryAttempts, getProxy, getProxyPassword, getProxyUsername, getReadTimeout, getRefreshLock, getRefreshToken, getRequestInterceptor, getRevokeURL, getTokenURL, getTrustManager, getUserAgent, getUseZstdCompression, modifyHttpClientBuilder, needsRefresh, notifyError, notifyRefresh, removeCustomHeader, removeListener, restore, restore, revokeToken, save, setAccessToken, setBaseAppUrl, setBaseAuthorizationURL, setBaseUploadURL, setBaseURL, setConnectTimeout, setCustomHeader, setExpires, setLastRefresh, setMaxRetryAttempts, setProxy, setProxyAuthenticator, setProxyBasicAuthentication, setProxyPassword, setProxyUsername, setReadTimeout, setRefreshToken, setRequestInterceptor, setUserAgent, setUseZstdCompression, suppressNotificationspublic BoxTransactionalAPIConnection(String accessToken)
accessToken - a transactional auth access token.public static BoxAPIConnection getTransactionConnection(String accessToken, String scope)
accessToken - application access token.scope - scope of transactional token.public static BoxAPIConnection getTransactionConnection(String accessToken, String scope, String resource)
accessToken - application access token.scope - scope of transactional token.resource - resource transactional token has access to.public void authenticate(String authCode)
authenticate in class BoxAPIConnectionauthCode - an auth code obtained from the first half of the OAuth process.UnsupportedOperationException - Box Transactional API does not support authentication with an auth codepublic boolean canRefresh()
canRefresh in class BoxAPIConnectionpublic void setAutoRefresh(boolean autoRefresh)
setAutoRefresh in class BoxAPIConnectionautoRefresh - true to enable auto token refresh; otherwise false.UnsupportedOperationException - Box Transactional API tokens can not be refreshedpublic void refresh()
refresh in class BoxAPIConnectionUnsupportedOperationException - Box Transactional API tokens can not be refreshed