mirror of
https://github.com/webmasterskaya/joomla-oauth-server.git
synced 2024-11-24 02:44:51 +03:00
_JEXEC & copyright
This commit is contained in:
parent
e8db3b1dae
commit
f53892aac5
@ -1,4 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Joomla.Site
|
||||||
|
* @subpackage com_oauthserver
|
||||||
|
*
|
||||||
|
* @copyright (c) 2024. Webmasterskaya. <https://webmasterskaya.xyz>
|
||||||
|
* @license MIT; see LICENSE.txt
|
||||||
|
**/
|
||||||
|
|
||||||
namespace Webmasterskaya\Component\OauthServer\Site\Entity;
|
namespace Webmasterskaya\Component\OauthServer\Site\Entity;
|
||||||
|
|
||||||
@ -7,6 +14,8 @@ use League\OAuth2\Server\Entities\Traits\AccessTokenTrait;
|
|||||||
use League\OAuth2\Server\Entities\Traits\EntityTrait;
|
use League\OAuth2\Server\Entities\Traits\EntityTrait;
|
||||||
use League\OAuth2\Server\Entities\Traits\TokenEntityTrait;
|
use League\OAuth2\Server\Entities\Traits\TokenEntityTrait;
|
||||||
|
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
class AccessToken implements AccessTokenEntityInterface
|
class AccessToken implements AccessTokenEntityInterface
|
||||||
{
|
{
|
||||||
use AccessTokenTrait;
|
use AccessTokenTrait;
|
||||||
@ -16,10 +25,10 @@ class AccessToken implements AccessTokenEntityInterface
|
|||||||
public function getData(): array
|
public function getData(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'identifier' => $this->getIdentifier(),
|
'identifier' => $this->getIdentifier(),
|
||||||
'expiry' => $this->getExpiryDateTime(),
|
'expiry' => $this->getExpiryDateTime(),
|
||||||
'user_id' => $this->getUserIdentifier(),
|
'user_id' => $this->getUserIdentifier(),
|
||||||
'scopes' => $this->getScopes(),
|
'scopes' => $this->getScopes(),
|
||||||
'client_identifier' => $this->getClient()->getIdentifier()
|
'client_identifier' => $this->getClient()->getIdentifier()
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Joomla.Site
|
||||||
|
* @subpackage com_oauthserver
|
||||||
|
*
|
||||||
|
* @copyright (c) 2024. Webmasterskaya. <https://webmasterskaya.xyz>
|
||||||
|
* @license MIT; see LICENSE.txt
|
||||||
|
**/
|
||||||
|
|
||||||
namespace Webmasterskaya\Component\OauthServer\Site\Entity;
|
namespace Webmasterskaya\Component\OauthServer\Site\Entity;
|
||||||
|
|
||||||
@ -7,6 +14,8 @@ use League\OAuth2\Server\Entities\Traits\AuthCodeTrait;
|
|||||||
use League\OAuth2\Server\Entities\Traits\EntityTrait;
|
use League\OAuth2\Server\Entities\Traits\EntityTrait;
|
||||||
use League\OAuth2\Server\Entities\Traits\TokenEntityTrait;
|
use League\OAuth2\Server\Entities\Traits\TokenEntityTrait;
|
||||||
|
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
class AuthCode implements AuthCodeEntityInterface
|
class AuthCode implements AuthCodeEntityInterface
|
||||||
{
|
{
|
||||||
use AuthCodeTrait;
|
use AuthCodeTrait;
|
||||||
@ -16,10 +25,10 @@ class AuthCode implements AuthCodeEntityInterface
|
|||||||
public function getData(): array
|
public function getData(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'identifier' => $this->getIdentifier(),
|
'identifier' => $this->getIdentifier(),
|
||||||
'expiry' => $this->getExpiryDateTime(),
|
'expiry' => $this->getExpiryDateTime(),
|
||||||
'user_id' => $this->getUserIdentifier(),
|
'user_id' => $this->getUserIdentifier(),
|
||||||
'scopes' => $this->getScopes(),
|
'scopes' => $this->getScopes(),
|
||||||
'client_identifier' => $this->getClient()->getIdentifier()
|
'client_identifier' => $this->getClient()->getIdentifier()
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Joomla.Site
|
||||||
|
* @subpackage com_oauthserver
|
||||||
|
*
|
||||||
|
* @copyright (c) 2024. Webmasterskaya. <https://webmasterskaya.xyz>
|
||||||
|
* @license MIT; see LICENSE.txt
|
||||||
|
**/
|
||||||
|
|
||||||
namespace Webmasterskaya\Component\OauthServer\Site\Entity;
|
namespace Webmasterskaya\Component\OauthServer\Site\Entity;
|
||||||
|
|
||||||
@ -6,6 +13,8 @@ use League\OAuth2\Server\Entities\ClientEntityInterface;
|
|||||||
use League\OAuth2\Server\Entities\Traits\ClientTrait;
|
use League\OAuth2\Server\Entities\Traits\ClientTrait;
|
||||||
use League\OAuth2\Server\Entities\Traits\EntityTrait;
|
use League\OAuth2\Server\Entities\Traits\EntityTrait;
|
||||||
|
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
class Client implements ClientEntityInterface
|
class Client implements ClientEntityInterface
|
||||||
{
|
{
|
||||||
use ClientTrait;
|
use ClientTrait;
|
||||||
@ -22,7 +31,7 @@ class Client implements ClientEntityInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string[] $redirectUri
|
* @param string[] $redirectUri
|
||||||
*/
|
*/
|
||||||
public function setRedirectUri(array $redirectUri): void
|
public function setRedirectUri(array $redirectUri): void
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Joomla.Site
|
||||||
|
* @subpackage com_oauthserver
|
||||||
|
*
|
||||||
|
* @copyright (c) 2024. Webmasterskaya. <https://webmasterskaya.xyz>
|
||||||
|
* @license MIT; see LICENSE.txt
|
||||||
|
**/
|
||||||
|
|
||||||
namespace Webmasterskaya\Component\OauthServer\Site\Entity;
|
namespace Webmasterskaya\Component\OauthServer\Site\Entity;
|
||||||
|
|
||||||
@ -6,6 +13,8 @@ use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
|
|||||||
use League\OAuth2\Server\Entities\Traits\EntityTrait;
|
use League\OAuth2\Server\Entities\Traits\EntityTrait;
|
||||||
use League\OAuth2\Server\Entities\Traits\RefreshTokenTrait;
|
use League\OAuth2\Server\Entities\Traits\RefreshTokenTrait;
|
||||||
|
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
class RefreshToken implements RefreshTokenEntityInterface
|
class RefreshToken implements RefreshTokenEntityInterface
|
||||||
{
|
{
|
||||||
use EntityTrait;
|
use EntityTrait;
|
||||||
@ -14,8 +23,8 @@ class RefreshToken implements RefreshTokenEntityInterface
|
|||||||
public function getData(): array
|
public function getData(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'identifier' => $this->getIdentifier(),
|
'identifier' => $this->getIdentifier(),
|
||||||
'expiry' => $this->getExpiryDateTime(),
|
'expiry' => $this->getExpiryDateTime(),
|
||||||
'access_token_identifier' => $this->getAccessToken()->getIdentifier()
|
'access_token_identifier' => $this->getAccessToken()->getIdentifier()
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Joomla.Site
|
||||||
|
* @subpackage com_oauthserver
|
||||||
|
*
|
||||||
|
* @copyright (c) 2024. Webmasterskaya. <https://webmasterskaya.xyz>
|
||||||
|
* @license MIT; see LICENSE.txt
|
||||||
|
**/
|
||||||
|
|
||||||
namespace Webmasterskaya\Component\OauthServer\Site\Entity;
|
namespace Webmasterskaya\Component\OauthServer\Site\Entity;
|
||||||
|
|
||||||
use League\OAuth2\Server\Entities\ScopeEntityInterface;
|
use League\OAuth2\Server\Entities\ScopeEntityInterface;
|
||||||
use League\OAuth2\Server\Entities\Traits\EntityTrait;
|
use League\OAuth2\Server\Entities\Traits\EntityTrait;
|
||||||
|
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
final class Scope implements ScopeEntityInterface
|
final class Scope implements ScopeEntityInterface
|
||||||
{
|
{
|
||||||
use EntityTrait;
|
use EntityTrait;
|
||||||
@ -31,7 +40,8 @@ final class Scope implements ScopeEntityInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $description
|
* @param string $description
|
||||||
|
*
|
||||||
* @since version
|
* @since version
|
||||||
*/
|
*/
|
||||||
public function setDescription(string $description): void
|
public function setDescription(string $description): void
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Joomla.Site
|
||||||
|
* @subpackage com_oauthserver
|
||||||
|
*
|
||||||
|
* @copyright (c) 2024. Webmasterskaya. <https://webmasterskaya.xyz>
|
||||||
|
* @license MIT; see LICENSE.txt
|
||||||
|
**/
|
||||||
|
|
||||||
namespace Webmasterskaya\Component\OauthServer\Site\Entity;
|
namespace Webmasterskaya\Component\OauthServer\Site\Entity;
|
||||||
|
|
||||||
use League\OAuth2\Server\Entities\Traits\EntityTrait;
|
use League\OAuth2\Server\Entities\Traits\EntityTrait;
|
||||||
use League\OAuth2\Server\Entities\UserEntityInterface;
|
use League\OAuth2\Server\Entities\UserEntityInterface;
|
||||||
|
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
class User implements UserEntityInterface
|
class User implements UserEntityInterface
|
||||||
{
|
{
|
||||||
use EntityTrait;
|
use EntityTrait;
|
||||||
|
Loading…
Reference in New Issue
Block a user