Class OAuth1Upgrader
Lets you convert OAuth 1 access tokens to OAuth 2 access tokens. First call OAuth1AccessTokenUpgrader::createOAuth2AccessToken() to get an OAuth 2 access token. If that succeeds, call OAuth1AccessTokenUpgrader::disableOAuth1AccessToken() to disable the OAuth 1 access token.
use \Dropbox as dbx; $appInfo = dbx\AppInfo::loadFromJsonFile(...); $clientIdentifier = "my-app/1.0"; $oauth1AccessToken = dbx\OAuth1AccessToken(...); $upgrader = new dbx\OAuth1AccessTokenUpgrader($appInfo, $clientIdentifier, ...); $oauth2AccessToken = $upgrader->getOAuth2AccessToken($oauth1AccessToken); $upgrader->disableOAuth1AccessToken($oauth1AccessToken);
- Dropbox\AuthBase
- Dropbox\OAuth1Upgrader
public
string
|
#
createOAuth2AccessToken(
Given an existing active OAuth 1 access token, make a Dropbox API call to get a new OAuth 2 access token that represents the same user and app. |
public
|
#
disableOAuth1AccessToken(
Make a Dropbox API call to disable the given OAuth 1 access token. |
__construct(),
getAppInfo(),
getClientIdentifier(),
getUserLocale()
|