interface OauthInterface in Media: Acquia DAM 8
OAuth Interface.
Hierarchy
- interface \Drupal\media_acquiadam\OauthInterface
Expanded class hierarchy of OauthInterface
All classes that implement OauthInterface
1 file declares its use of OauthInterface
- OauthController.php in src/
Controller/ OauthController.php
File
- src/
OauthInterface.php, line 8
Namespace
Drupal\media_acquiadamView source
interface OauthInterface {
/**
* Get the URL to redirect a user to to start the oauth process.
*
* @return string
* The URL to redirect to.
*/
public function getAuthLink();
/**
* Validate that the state token in an auth request is valid.
*
* @param string $token
* The CSRF token from the auth request.
*
* @return bool
* TRUE if the state is valid. FALSE otherwise.
*/
public function authRequestStateIsValid($token);
/**
* Get a token for API access + the number of seconds till expiration.
*
* @param string $auth_code
* The authorization token from oauth.
*
* @return array
* Returns an array with three keys:
* - access_token: The access token used for API authorization.
* - expire_time: The unix timestamp when the access token expires.
* - refresh_token: The refresh token used for API authorization.
*/
public function getAccessToken($auth_code);
/**
* Refresh an existing access token.
*
* @param string $refresh_token
* The refresh token.
*
* @return array
* Returns an array with three keys:
* - access_token: The access token used for API authorization.
* - expire_time: The unix timestamp when the access token expires.
* - refresh_token: The refresh token used for API authorization.
*/
public function refreshAccess($refresh_token);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
OauthInterface:: |
public | function | Validate that the state token in an auth request is valid. | 1 |
OauthInterface:: |
public | function | Get a token for API access + the number of seconds till expiration. | 1 |
OauthInterface:: |
public | function | Get the URL to redirect a user to to start the oauth process. | 1 |
OauthInterface:: |
public | function | Refresh an existing access token. | 1 |