public function __construct($options = [])
 {
     if (!array_key_exists('redirectUri', $options)) {
         $options['redirectUri'] = static::getRedirectUri();
     }
     $siteConfig = SiteConfig::current_site_config();
     if (!array_key_exists('clientId', $options)) {
         $options['clientId'] = $siteConfig->HailClientID;
     }
     if (!array_key_exists('clientSecret', $options)) {
         $options['clientSecret'] = $siteConfig->HailClientSecret;
     }
     if (!array_key_exists('scopes', $options)) {
         $options['scopes'] = ['user.basic content.read'];
     }
     parent::__construct($options);
 }
Exemple #2
0
 /**
  * Get a new AccessToken.
  * @return League\OAuth2\Client\Token\AccessToken
  */
 protected function getToken()
 {
     return $this->provider->getAccessToken($this->getGrant(), ['refresh_token' => $this->oauthRefreshToken]);
 }