You are here

abstract class OAuth2Manager in Social Auth 8

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

Defines a basic OAuth2Manager.

@package Drupal\social_auth

Hierarchy

Expanded class hierarchy of OAuth2Manager

File

src/AuthManager/OAuth2Manager.php, line 10

Namespace

Drupal\social_auth\AuthManager
View source
abstract class OAuth2Manager implements OAuth2ManagerInterface {

  /**
   * The service client.
   *
   * @var mixed
   */
  protected $client;

  /**
   * Access token for OAuth2 authentication.
   *
   * @var mixed
   */
  protected $accessToken;

  /**
   * {@inheritdoc}
   */
  public function setClient($client) {
    $this->client = $client;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getClient() {
    return $this->client;
  }

  /**
   * {@inheritdoc}
   */
  public function getAccessToken() {
    return $this->accessToken;
  }

  /**
   * {@inheritdoc}
   */
  public function setAccessToken($access_token) {
    $this->accessToken = $access_token;
    return $this;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
OAuth2Manager::$accessToken protected property Access token for OAuth2 authentication.
OAuth2Manager::$client protected property The service client.
OAuth2Manager::getAccessToken public function Gets the access token after authentication. Overrides OAuth2ManagerInterface::getAccessToken
OAuth2Manager::getClient public function Gets the service client object. Overrides OAuth2ManagerInterface::getClient
OAuth2Manager::setAccessToken public function Sets the default access token. Overrides OAuth2ManagerInterface::setAccessToken
OAuth2Manager::setClient public function Sets the service client. Overrides OAuth2ManagerInterface::setClient
OAuth2ManagerInterface::authenticate public function Authenticates the users by using the access token.