continue oauth structuring NO_CI

This commit is contained in:
Dennis Eichhorn 2020-07-04 17:49:05 +02:00
parent be11b8359d
commit 644af71b73
2 changed files with 82 additions and 2 deletions

View File

@ -0,0 +1,75 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package phpOMS\Auth\OAuth2
* @copyright Dennis Eichhorn
* @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\Provider;
use phpOMS\Auth\OAuth2\AccessToken;
/**
* Provider class.
*
* @package phpOMS\Auth\OAuth2
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class GeneralProvider
{
/**
* Authorization url
*
* @var string
* @since 1.0.0
*/
private string $urlAuthorize;
/**
* Access token url
*
* @var string
* @since 1.0.0
*/
private string $urlAccessToken;
public function __construct(array $options = [], array $collaborators = [])
{
}
public function getDefaultScopes() : array
{
return $this->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);
}
}

View File

@ -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 = [])
{
}
}