*/
protected $tokenEndpoint;
+ /**
+ * Scopes to use for the OIDC authorization call.
+ */
+ protected array $scopes = ['openid', 'profile', 'email'];
+
/**
* Returns the base URL for authorizing a client.
*/
return '';
}
+ /**
+ * Add an additional scope to this provider upon the default.
+ */
+ public function addScope(string $scope): void
+ {
+ $this->scopes[] = $scope;
+ $this->scopes = array_unique($this->scopes);
+ }
+
/**
* Returns the default scopes used by this provider.
*
*/
protected function getDefaultScopes(): array
{
- return ['openid', 'profile', 'email'];
+ return $this->scopes;
}
/**