DropboxAuthHelper
class DropboxAuthHelper (View source)
Constants
CSRF_LENGTH |
The length of CSRF string |
Properties
protected OAuth2Client | $oAuth2Client | OAuth2 Client | |
protected RandomStringGeneratorInterface | $randomStringGenerator | Random String Generator | |
protected PersistentDataStoreInterface | $persistentDataStore | Persistent Data Store | |
protected string | $urlState | Additional User Provided State |
Methods
__construct(OAuth2Client $oAuth2Client, RandomStringGeneratorInterface $randomStringGenerator = null, PersistentDataStoreInterface $persistentDataStore = null)
Create a new DropboxAuthHelper instance
getOAuth2Client()
Get OAuth2Client
getRandomStringGenerator()
Get the Random String Generator
getPersistentDataStore()
Get the Persistent Data Store
string
getCsrfToken()
Get CSRF Token
string
getAuthUrl(string $redirectUri, array $params = array(), string $urlState = null)
Get Authorization URL
array
decodeState(string $state)
Decode State to get the CSRF Token and the URL State
void
validateCSRFToken(string $csrfToken)
Validate CSRF Token
getAccessToken(string $code, string $state, string $redirectUri)
Get Access Token
void
revokeAccessToken()
Revoke Access Token
string
getUrlState()
Get URL State
Details
at line line 53
__construct(OAuth2Client $oAuth2Client, RandomStringGeneratorInterface $randomStringGenerator = null, PersistentDataStoreInterface $persistentDataStore = null)
Create a new DropboxAuthHelper instance
at line line 68
OAuth2Client
getOAuth2Client()
Get OAuth2Client
at line line 78
RandomStringGeneratorInterface
getRandomStringGenerator()
Get the Random String Generator
at line line 88
PersistentDataStoreInterface
getPersistentDataStore()
Get the Persistent Data Store
at line line 98
protected string
getCsrfToken()
Get CSRF Token
at line line 116
string
getAuthUrl(string $redirectUri, array $params = array(), string $urlState = null)
Get Authorization URL
at line line 141
protected array
decodeState(string $state)
Decode State to get the CSRF Token and the URL State
at line line 164
protected void
validateCSRFToken(string $csrfToken)
Validate CSRF Token
at line line 191
AccessToken
getAccessToken(string $code, string $state, string $redirectUri)
Get Access Token
at line line 217
void
revokeAccessToken()
Revoke Access Token
at line line 227
string
getUrlState()
Get URL State