Overview

Classes

  • Dropbox\AppInfo
  • Dropbox\ArrayEntryStore
  • Dropbox\AuthBase
  • Dropbox\AuthInfo
  • Dropbox\Client
  • Dropbox\OAuth1AccessToken
  • Dropbox\OAuth1Upgrader
  • Dropbox\Path
  • Dropbox\RootCertificates
  • Dropbox\Security
  • Dropbox\SSLTester
  • Dropbox\Util
  • Dropbox\WebAuth
  • Dropbox\WebAuthBase
  • Dropbox\WebAuthNoRedirect
  • Dropbox\WriteMode

Interfaces

  • Dropbox\ValueStore

Exceptions

  • Dropbox\AppInfoLoadException
  • Dropbox\AuthInfoLoadException
  • Dropbox\DeserializeException
  • Dropbox\Exception
  • Dropbox\Exception_BadRequest
  • Dropbox\Exception_BadResponse
  • Dropbox\Exception_BadResponseCode
  • Dropbox\Exception_InvalidAccessToken
  • Dropbox\Exception_NetworkIO
  • Dropbox\Exception_OverQuota
  • Dropbox\Exception_ProtocolError
  • Dropbox\Exception_RetryLater
  • Dropbox\Exception_ServerError
  • Dropbox\HostLoadException
  • Dropbox\StreamReadException
  • Dropbox\WebAuthException_BadRequest
  • Dropbox\WebAuthException_BadState
  • Dropbox\WebAuthException_Csrf
  • Dropbox\WebAuthException_NotApproved
  • Dropbox\WebAuthException_Provider
  • Overview
  • Class
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 
<?php
namespace Dropbox;

/**
 * Use with {@link OAuth1Upgrader} to convert old OAuth 1 access tokens
 * to OAuth 2 access tokens.  This SDK doesn't support using OAuth 1
 * access tokens for regular API calls.
 */
class OAuth1AccessToken
{
    /**
     * The OAuth 1 access token key.
     *
     * @return string
     */
    function getKey() { return $this->key; }

    /** @var string */
    private $key;

    /**
     * The OAuth 1 access token secret.
     *
     * 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 code that includes their app secret.  Do not do that.
     *
     * @return string
     */
    function getSecret() { return $this->secret; }

    /** @var secret */
    private $secret;

    /**
     * Constructor.
     *
     * @param string $key
     *     {@link getKey()}
     * @param string $secret
     *     {@link getSecret()}
     */
    function __construct($key, $secret)
    {
        AppInfo::checkKeyArg($key);
        AppInfo::checkSecretArg($secret);

        $this->key = $key;
        $this->secret = $secret;
    }

    /**
     * Use this to check that a function argument is of type `AppInfo`
     *
     * @internal
     */
    static function checkArg($argName, $argValue)
    {
        if (!($argValue instanceof self)) Checker::throwError($argName, $argValue, __CLASS__);
    }
}
Dropbox SDK for PHP API documentation generated by ApiGen