Commit c2339ee2 authored by saranya ashokkumar's avatar saranya ashokkumar Committed by Fabian de Rijk
Browse files

Issue #3265482 by saranya ashokkumar: Abstract Methods missing

parent f929746f
Loading
Loading
Loading
Loading
+23 −3
Original line number Diff line number Diff line
@@ -2,9 +2,8 @@

namespace Drupal\o365\Plugin\Oauth2Client;

use Drupal;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\oauth2_client\Plugin\Oauth2Client\Oauth2ClientPluginBase;
use League\OAuth2\Client\Token\AccessToken;

/**
 * OAuth2 Client to authenticate with Office 365.
@@ -35,7 +34,28 @@ class O365OAuth2Client extends Oauth2ClientPluginBase {
   */
  public function getClientSecret() {
    $config = $this->configFactory->get('o365.api_settings');
    return $config->get('tenant_id');
    return $config->get('client_secret');
  }

  /**
   * {@inheritdoc}
   */
  public function storeAccessToken(AccessToken $accessToken) {
    $this->state->set('oauth2_client_access_token-' . $this->getId(), $accessToken);
  }

  /**
   * {@inheritdoc}
   */
  public function retrieveAccessToken() {
    return $this->state->get('oauth2_client_access_token-' . $this->getId());
  }

  /**
   * {@inheritdoc}
   */
  public function clearAccessToken() {
    $this->state->delete('oauth2_client_access_token-' . $this->getId());
  }

}