diff --git a/com_oauthserver/site/src/Entity/AccessToken.php b/com_oauthserver/site/src/Entity/AccessToken.php index 7090098..cf0fc21 100644 --- a/com_oauthserver/site/src/Entity/AccessToken.php +++ b/com_oauthserver/site/src/Entity/AccessToken.php @@ -1,4 +1,11 @@ + * @license MIT; see LICENSE.txt + **/ 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\TokenEntityTrait; +\defined('_JEXEC') or die; + class AccessToken implements AccessTokenEntityInterface { use AccessTokenTrait; @@ -16,11 +25,11 @@ class AccessToken implements AccessTokenEntityInterface public function getData(): array { return [ - 'identifier' => $this->getIdentifier(), - 'expiry' => $this->getExpiryDateTime(), - 'user_id' => $this->getUserIdentifier(), - 'scopes' => $this->getScopes(), + 'identifier' => $this->getIdentifier(), + 'expiry' => $this->getExpiryDateTime(), + 'user_id' => $this->getUserIdentifier(), + 'scopes' => $this->getScopes(), 'client_identifier' => $this->getClient()->getIdentifier() ]; } -} \ No newline at end of file +} diff --git a/com_oauthserver/site/src/Entity/AuthCode.php b/com_oauthserver/site/src/Entity/AuthCode.php index 2aafdb4..84a1ffb 100644 --- a/com_oauthserver/site/src/Entity/AuthCode.php +++ b/com_oauthserver/site/src/Entity/AuthCode.php @@ -1,4 +1,11 @@ + * @license MIT; see LICENSE.txt + **/ 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\TokenEntityTrait; +\defined('_JEXEC') or die; + class AuthCode implements AuthCodeEntityInterface { use AuthCodeTrait; @@ -16,11 +25,11 @@ class AuthCode implements AuthCodeEntityInterface public function getData(): array { return [ - 'identifier' => $this->getIdentifier(), - 'expiry' => $this->getExpiryDateTime(), - 'user_id' => $this->getUserIdentifier(), - 'scopes' => $this->getScopes(), + 'identifier' => $this->getIdentifier(), + 'expiry' => $this->getExpiryDateTime(), + 'user_id' => $this->getUserIdentifier(), + 'scopes' => $this->getScopes(), 'client_identifier' => $this->getClient()->getIdentifier() ]; } -} \ No newline at end of file +} diff --git a/com_oauthserver/site/src/Entity/Client.php b/com_oauthserver/site/src/Entity/Client.php index 3b73ff0..c5078b7 100644 --- a/com_oauthserver/site/src/Entity/Client.php +++ b/com_oauthserver/site/src/Entity/Client.php @@ -1,4 +1,11 @@ + * @license MIT; see LICENSE.txt + **/ 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\EntityTrait; +\defined('_JEXEC') or die; + class Client implements ClientEntityInterface { use ClientTrait; @@ -22,7 +31,7 @@ class Client implements ClientEntityInterface } /** - * @param string[] $redirectUri + * @param string[] $redirectUri */ public function setRedirectUri(array $redirectUri): void { @@ -43,4 +52,4 @@ class Client implements ClientEntityInterface { $this->allowPlainTextPkce = $allowPlainTextPkce; } -} \ No newline at end of file +} diff --git a/com_oauthserver/site/src/Entity/RefreshToken.php b/com_oauthserver/site/src/Entity/RefreshToken.php index 1d23dc3..7fe7015 100644 --- a/com_oauthserver/site/src/Entity/RefreshToken.php +++ b/com_oauthserver/site/src/Entity/RefreshToken.php @@ -1,4 +1,11 @@ + * @license MIT; see LICENSE.txt + **/ 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\RefreshTokenTrait; +\defined('_JEXEC') or die; + class RefreshToken implements RefreshTokenEntityInterface { use EntityTrait; @@ -14,9 +23,9 @@ class RefreshToken implements RefreshTokenEntityInterface public function getData(): array { return [ - 'identifier' => $this->getIdentifier(), - 'expiry' => $this->getExpiryDateTime(), + 'identifier' => $this->getIdentifier(), + 'expiry' => $this->getExpiryDateTime(), 'access_token_identifier' => $this->getAccessToken()->getIdentifier() ]; } -} \ No newline at end of file +} diff --git a/com_oauthserver/site/src/Entity/Scope.php b/com_oauthserver/site/src/Entity/Scope.php index 88d5c97..b3c1c75 100644 --- a/com_oauthserver/site/src/Entity/Scope.php +++ b/com_oauthserver/site/src/Entity/Scope.php @@ -1,10 +1,19 @@ + * @license MIT; see LICENSE.txt + **/ namespace Webmasterskaya\Component\OauthServer\Site\Entity; use League\OAuth2\Server\Entities\ScopeEntityInterface; use League\OAuth2\Server\Entities\Traits\EntityTrait; +\defined('_JEXEC') or die; + final class Scope implements ScopeEntityInterface { use EntityTrait; @@ -31,7 +40,8 @@ final class Scope implements ScopeEntityInterface } /** - * @param string $description + * @param string $description + * * @since version */ public function setDescription(string $description): void @@ -45,4 +55,4 @@ final class Scope implements ScopeEntityInterface } -} \ No newline at end of file +} diff --git a/com_oauthserver/site/src/Entity/User.php b/com_oauthserver/site/src/Entity/User.php index b185fa4..d6d013b 100644 --- a/com_oauthserver/site/src/Entity/User.php +++ b/com_oauthserver/site/src/Entity/User.php @@ -1,10 +1,19 @@ + * @license MIT; see LICENSE.txt + **/ namespace Webmasterskaya\Component\OauthServer\Site\Entity; use League\OAuth2\Server\Entities\Traits\EntityTrait; use League\OAuth2\Server\Entities\UserEntityInterface; +\defined('_JEXEC') or die; + class User implements UserEntityInterface { use EntityTrait; @@ -13,4 +22,4 @@ class User implements UserEntityInterface { $this->setIdentifier($user->id); } -} \ No newline at end of file +}