You are here

interface Oauth2ClientServiceInterface in OAuth2 Client 8.2

Same name and namespace in other branches
  1. 8.3 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

1 file declares its use of Oauth2ClientServiceInterface
ClientTestForm.php in src/Form/ClientTestForm.php

File

src/Service/Oauth2ClientServiceInterface.php, line 8

Namespace

Drupal\oauth2_client\Service
View source
interface Oauth2ClientServiceInterface {

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

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

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

}

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 the Drupal state. 1