You are here

interface Oauth2ClientPluginInterface in OAuth2 Client 8.3

Same name and namespace in other branches
  1. 8.2 src/Plugin/Oauth2Client/Oauth2ClientPluginInterface.php \Drupal\oauth2_client\Plugin\Oauth2Client\Oauth2ClientPluginInterface

Interface for Oauth2 Client plugins.

Hierarchy

Expanded class hierarchy of Oauth2ClientPluginInterface

All classes that implement Oauth2ClientPluginInterface

1 file declares its use of Oauth2ClientPluginInterface
CredentialProvider.php in src/Service/CredentialProvider.php

File

src/Plugin/Oauth2Client/Oauth2ClientPluginInterface.php, line 14

Namespace

Drupal\oauth2_client\Plugin\Oauth2Client
View source
interface Oauth2ClientPluginInterface extends PluginInspectionInterface, ContainerFactoryPluginInterface, PluginFormInterface, ConfigurableInterface {

  /**
   * Retrieves the human-readable name of the Oauth2 Client plugin.
   *
   * @return string
   *   The name of the plugin.
   */
  public function getName();

  /**
   * Retrieves the id of the OAuth2 Client plugin.
   *
   * @return string
   *   The id of the plugin.
   */
  public function getId();

  /**
   * Retrieves the grant type of the plugin.
   *
   * @return string
   *   Possible values:
   *   - authorization_code
   *   - client_credentials
   *   - refresh_token
   *   - resource_owner
   */
  public function getGrantType();

  /**
   * Retrieves the client_id of the OAuth2 server.
   *
   * @return string
   *   The client_id of the OAuth2 server.
   */
  public function getClientId();

  /**
   * Retrieves the client_secret of the OAuth2 server.
   *
   * @return string
   *   The client_secret of the OAuth2 server.
   */
  public function getClientSecret();

  /**
   * Retrieves the redirect_uri of the OAuth2 server.
   *
   * @return string
   *   The redirect_uri of the OAuth2 server.
   */
  public function getRedirectUri();

  /**
   * Retrieves the authorization_uri of the OAuth2 server.
   *
   * @return string
   *   The authorization_uri of the OAuth2 server.
   */
  public function getAuthorizationUri();

  /**
   * Retrieves the token_uri of the OAuth2 server.
   *
   * @return string
   *   The authorization_uri of the OAuth2 server.
   */
  public function getTokenUri();

  /**
   * Retrieves the resource_uri of the OAuth2 server.
   *
   * @return string
   *   The resource_uri of the OAuth2 server.
   */
  public function getResourceUri();

  /**
   * Get the set of scopes for the provider to use by default.
   *
   * @return array|string|null
   *   The list of scopes for the provider to use.
   */
  public function getScopes();

  /**
   * Get the separator used to join the scopes in the OAuth2 query string.
   *
   * @return string|null
   *   The scopes separator to join the list of scopes in the query string.
   */
  public function getScopeSeparator();

  /**
   * Returns the plugin credentials if they are set, otherwise returns NULL.
   *
   * @return string|null
   *   The data.
   */
  public function getCredentialProvider();

  /**
   * Returns the credential storage key if it is set, otherwise returns NULL.
   *
   * @return mixed|null
   *   The data.
   */
  public function getStorageKey();

  /**
   * Stores access tokens obtained by this client.
   *
   * @param \League\OAuth2\Client\Token\AccessToken $accessToken
   *   The token to store.
   */
  public function storeAccessToken(AccessToken $accessToken);

  /**
   * Retrieve the access token storage.
   *
   * @return mixed
   *   The stored token, or NULL if no value exists.
   */
  public function retrieveAccessToken();

  /**
   * Clears the access token from storage.
   */
  public function clearAccessToken();

  /**
   * Check the plugin definition for success_message or return a static value.
   *
   * @return bool
   *   Should a success message be displayed to the user?
   */
  public function displaySuccessMessage();

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 112
Oauth2ClientPluginInterface::clearAccessToken public function Clears the access token from storage. 4
Oauth2ClientPluginInterface::displaySuccessMessage public function Check the plugin definition for success_message or return a static value. 1
Oauth2ClientPluginInterface::getAuthorizationUri public function Retrieves the authorization_uri of the OAuth2 server. 1
Oauth2ClientPluginInterface::getClientId public function Retrieves the client_id of the OAuth2 server. 1
Oauth2ClientPluginInterface::getClientSecret public function Retrieves the client_secret of the OAuth2 server. 1
Oauth2ClientPluginInterface::getCredentialProvider public function Returns the plugin credentials if they are set, otherwise returns NULL. 1
Oauth2ClientPluginInterface::getGrantType public function Retrieves the grant type of the plugin. 1
Oauth2ClientPluginInterface::getId public function Retrieves the id of the OAuth2 Client plugin. 1
Oauth2ClientPluginInterface::getName public function Retrieves the human-readable name of the Oauth2 Client plugin. 1
Oauth2ClientPluginInterface::getRedirectUri public function Retrieves the redirect_uri of the OAuth2 server. 1
Oauth2ClientPluginInterface::getResourceUri public function Retrieves the resource_uri of the OAuth2 server. 1
Oauth2ClientPluginInterface::getScopes public function Get the set of scopes for the provider to use by default. 1
Oauth2ClientPluginInterface::getScopeSeparator public function Get the separator used to join the scopes in the OAuth2 query string. 1
Oauth2ClientPluginInterface::getStorageKey public function Returns the credential storage key if it is set, otherwise returns NULL. 1
Oauth2ClientPluginInterface::getTokenUri public function Retrieves the token_uri of the OAuth2 server. 1
Oauth2ClientPluginInterface::retrieveAccessToken public function Retrieve the access token storage. 4
Oauth2ClientPluginInterface::storeAccessToken public function Stores access tokens obtained by this client. 4
PluginFormInterface::buildConfigurationForm public function Form constructor. 36
PluginFormInterface::submitConfigurationForm public function Form submission handler. 32
PluginFormInterface::validateConfigurationForm public function Form validation handler. 18
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2