diff --git a/Auth/OAuth2/Provider/GeneralProvider.php b/Auth/OAuth2/Provider/GeneralProvider.php new file mode 100644 index 000000000..dce3d0156 --- /dev/null +++ b/Auth/OAuth2/Provider/GeneralProvider.php @@ -0,0 +1,75 @@ +scopes; + } + + private function getAccessTokenMethod() : string + { + return $this->accessTokenMethod ?: parent::getAccessTokenMethod(); + } + + private function getAccessTokenResourceOwnerId() : string + { + return $this->accessTokenResourceOwnerId ?: parent::getAccessTokenResourceOwnerId(); + } + + private function getScopeSeparator() : string + { + return $this->scopeSeparator ?: parent::getScopeSeparator(); + } + + private function createResourceOwner(array $reesponse, AccessToken $token) : GeneralResourceOwner + { + return new GeneralResourceOwner($response, $this->responseResourceOwnerId); + } +} diff --git a/Auth/OAuth2/Provider.php b/Auth/OAuth2/Provider/ProviderAbstract.php similarity index 64% rename from Auth/OAuth2/Provider.php rename to Auth/OAuth2/Provider/ProviderAbstract.php index 7b7eff320..e8802a9fb 100644 --- a/Auth/OAuth2/Provider.php +++ b/Auth/OAuth2/Provider/ProviderAbstract.php @@ -9,10 +9,11 @@ * @license OMS License 1.0 * @version 1.0.0 * @link https://orange-management.org + * @see https://tools.ietf.org/html/rfc6749 */ declare(strict_types=1); -namespace phpOMS\Auth\OAuth2; +namespace phpOMS\Auth\OAuth2\Provider; /** * Provider class. @@ -22,6 +23,10 @@ namespace phpOMS\Auth\OAuth2; * @link https://orange-management.org * @since 1.0.0 */ -final class Provider +abstract class ProviderAbstract { + public function __construct(array $options = [], array $collaborators = []) + { + + } }