You are here

interface Oauth2ClientServiceInterface in OAuth2 Client 8.3

Same name and namespace in other branches
  1. 8.2 src/Service/Oauth2ClientServiceInterface.php \Drupal\oauth2_client\Service\Oauth2ClientServiceInterface

Interface for the OAuth2 Client service.

Hierarchy

Expanded class hierarchy of Oauth2ClientServiceInterface

All classes that implement Oauth2ClientServiceInterface

File

src/Service/Oauth2ClientServiceInterface.php, line 8

Namespace

Drupal\oauth2_client\Service
View source
interface Oauth2ClientServiceInterface {

  /**
   * Retrieve an OAuth2 Client Plugin.
   *
   * @param string $pluginId
   *   The plugin ID of the client to be retrieved.
   *
   * @return \Drupal\oauth2_client\Plugin\Oauth2Client\Oauth2ClientPluginInterface
   *   The OAuth2 Client plugin.
   */
  public function getClient($pluginId);

  /**
   * Retrieve an access token from storage.
   *
   * @param string $pluginId
   *   The client for which a provider should be created.
   *
   * @return \League\OAuth2\Client\Token\AccessTokenInterface|null
   *   The Access Token for the given client ID.
   */
  public function retrieveAccessToken($pluginId);

  /**
   * Clears the access token for the given client.
   *
   * @param string $pluginId
   *   The client for which a provider should be created.
   */
  public function clearAccessToken($pluginId);

}

Members

Namesort descending Modifiers Type Description Overrides
Oauth2ClientServiceInterface::clearAccessToken public function Clears the access token for the given client. 1
Oauth2ClientServiceInterface::getClient public function Retrieve an OAuth2 Client Plugin. 1
Oauth2ClientServiceInterface::retrieveAccessToken public function Retrieve an access token from storage. 1