You are here

interface OAuth2ManagerInterface in Social Auth 8.2

Same name and namespace in other branches
  1. 8 src/AuthManager/OAuth2ManagerInterface.php \Drupal\social_auth\AuthManager\OAuth2ManagerInterface
  2. 3.x src/AuthManager/OAuth2ManagerInterface.php \Drupal\social_auth\AuthManager\OAuth2ManagerInterface

Defines an OAuth2Manager Interface.

@package Drupal\social_auth\AuthManager

Hierarchy

Expanded class hierarchy of OAuth2ManagerInterface

All classes that implement OAuth2ManagerInterface

1 file declares its use of OAuth2ManagerInterface
OAuth2ControllerBase.php in src/Controller/OAuth2ControllerBase.php

File

src/AuthManager/OAuth2ManagerInterface.php, line 12

Namespace

Drupal\social_auth\AuthManager
View source
interface OAuth2ManagerInterface extends BaseOAuth2ManagerInterface {

  /**
   * Request data from the declared endpoints.
   *
   * @param string $method
   *   The HTTP method for the request.
   * @param string|null $domain
   *   The domain to request.
   *
   * @return array|null
   *   The extra details gotten from provider.
   */
  public function getExtraDetails($method = 'GET', $domain = NULL);

  /**
   * Request and end point.
   *
   * @param string $method
   *   The HTTP method for the request.
   * @param string $path
   *   The path to request.
   * @param string|null $domain
   *   The domain to request.
   * @param array $options
   *   Request options.
   *
   * @return array|mixed
   *   Data returned by provider.
   */
  public function requestEndPoint($method, $path, $domain = NULL, array $options = []);

  /**
   * Gets the scopes defined in the settings form.
   *
   * @return string
   *   Data points separated by comma.
   */
  public function getScopes();

  /**
   * Gets the API endpoints to be requested.
   *
   * @return string
   *   API endpoints separated in different lines.
   */
  public function getEndPoints();

}

Members

Namesort descending Modifiers Type Description Overrides
OAuth2ManagerInterface::authenticate public function Authenticates the user.
OAuth2ManagerInterface::getAccessToken public function Gets the access token after authentication. 1
OAuth2ManagerInterface::getAuthorizationUrl public function Returns the authorization URL where user will be redirected.
OAuth2ManagerInterface::getClient public function Gets the service client object. 1
OAuth2ManagerInterface::getEndPoints public function Gets the API endpoints to be requested. 1
OAuth2ManagerInterface::getExtraDetails public function Request data from the declared endpoints. 1
OAuth2ManagerInterface::getScopes public function Gets the scopes defined in the settings form. 1
OAuth2ManagerInterface::getState public function Returns OAuth2 state.
OAuth2ManagerInterface::getUserInfo public function Gets data about the user.
OAuth2ManagerInterface::requestEndPoint public function Request and end point.
OAuth2ManagerInterface::setAccessToken public function Sets the access token. 1
OAuth2ManagerInterface::setClient public function Sets the provider client. 1