You are here

class GoogleAuthSettings in Social Auth Google 8

Same name and namespace in other branches
  1. 8.2 src/Settings/GoogleAuthSettings.php \Drupal\social_auth_google\Settings\GoogleAuthSettings
  2. 3.x src/Settings/GoogleAuthSettings.php \Drupal\social_auth_google\Settings\GoogleAuthSettings

Returns the client information.

Hierarchy

Expanded class hierarchy of GoogleAuthSettings

File

src/Settings/GoogleAuthSettings.php, line 10

Namespace

Drupal\social_auth_google\Settings
View source
class GoogleAuthSettings extends SettingsBase implements GoogleAuthSettingsInterface {

  /**
   * Client ID.
   *
   * @var string
   */
  protected $clientId;

  /**
   * Client secret.
   *
   * @var string
   */
  protected $clientSecret;

  /**
   * Restricted domain.
   *
   * @var string
   */
  protected $restrictedDomain;

  /**
   * {@inheritdoc}
   */
  public function getClientId() {
    if (!$this->clientId) {
      $this->clientId = $this->config
        ->get('client_id');
    }
    return $this->clientId;
  }

  /**
   * {@inheritdoc}
   */
  public function getClientSecret() {
    if (!$this->clientSecret) {
      $this->clientSecret = $this->config
        ->get('client_secret');
    }
    return $this->clientSecret;
  }

  /**
   * {@inheritdoc}
   */
  public function getRestrictedDomain() {
    if (!$this->restrictedDomain) {
      $this->restrictedDomain = $this->config
        ->get('restricted_domain');
    }
    return $this->restrictedDomain;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
GoogleAuthSettings::$clientId protected property Client ID.
GoogleAuthSettings::$clientSecret protected property Client secret.
GoogleAuthSettings::$restrictedDomain protected property Restricted domain.
GoogleAuthSettings::getClientId public function Gets the client ID. Overrides GoogleAuthSettingsInterface::getClientId
GoogleAuthSettings::getClientSecret public function Gets the client secret. Overrides GoogleAuthSettingsInterface::getClientSecret
GoogleAuthSettings::getRestrictedDomain public function Gets the Restricted domain. Overrides GoogleAuthSettingsInterface::getRestrictedDomain