diff --git a/src/Provider/Genesys.php b/src/Provider/Genesys.php index df8acb9..c842fa6 100644 --- a/src/Provider/Genesys.php +++ b/src/Provider/Genesys.php @@ -194,6 +194,6 @@ protected function createResourceOwner(array $response, AccessToken $token): Res */ protected function createAccessToken(array $response, AbstractGrant $grant): AccessTokenInterface { - return new GenesysAccessToken($response); + return new AccessToken($response); } } diff --git a/src/Token/GenesysAccessToken.php b/src/Token/GenesysAccessToken.php deleted file mode 100644 index 64e1eeb..0000000 --- a/src/Token/GenesysAccessToken.php +++ /dev/null @@ -1,86 +0,0 @@ -scope = $options['scope']; - } - if (! empty($options['info'])) { - $this->info = $options['info']; - } - parent::__construct($options); - } - - /** - * @return string[] - */ - public function getScopes() - { - if (empty($this->scope)) { - return []; - } - - return array_filter(explode(' ', $this->scope)); - } - - /** - * @return array|null - */ - public function getInfo() - { - return $this->info; - } - - /** - * @param string $scope - * @return bool - */ - public function hasScope($scope) - { - $scope = trim(strtolower($scope)); - foreach ($this->getScopes() as $candidate) { - if ($scope === strtolower(trim($candidate))) { - return true; - } - } - - return false; - } - - /** - * @inheritdoc - */ - public function jsonSerialize() - { - $parameters = parent::jsonSerialize(); - - if ($this->scope) { - $parameters['scope'] = $this->scope; - } - - if (! empty($this->info)) { - $parameters['info'] = $this->info; - } - - return $parameters; - } -}