mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-14 02:58:40 +00:00
continue oauth structuring NO_CI
This commit is contained in:
parent
be11b8359d
commit
644af71b73
75
Auth/OAuth2/Provider/GeneralProvider.php
Normal file
75
Auth/OAuth2/Provider/GeneralProvider.php
Normal 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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 = [])
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user