From 363905489838ff3f9a63d7d8009e9f97c4a0c92f Mon Sep 17 00:00:00 2001 From: Artem Vasilev Date: Mon, 4 Mar 2024 03:18:17 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=84=D0=B5?= =?UTF-8?q?=D0=B9=D1=81=D0=BE=D0=B2=20=D0=B8=D0=B7=20=D0=B1=D0=B8=D0=B1?= =?UTF-8?q?=D0=BB=D0=B8=D0=BE=D1=82=D0=B5=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Repository/AccessTokenRepository.php | 40 +++++++++++++++++++ .../src/Repository/AuthCodeRepository.php | 30 ++++++++++++++ .../site/src/Repository/ClientRepository.php | 37 +++++++++++++++++ .../src/Repository/RefreshTokenRepository.php | 30 ++++++++++++++ .../site/src/Repository/ScopeRepository.php | 20 ++++++++++ 5 files changed, 157 insertions(+) create mode 100644 com_oauthserver/site/src/Repository/AccessTokenRepository.php create mode 100644 com_oauthserver/site/src/Repository/AuthCodeRepository.php create mode 100644 com_oauthserver/site/src/Repository/ClientRepository.php create mode 100644 com_oauthserver/site/src/Repository/RefreshTokenRepository.php create mode 100644 com_oauthserver/site/src/Repository/ScopeRepository.php diff --git a/com_oauthserver/site/src/Repository/AccessTokenRepository.php b/com_oauthserver/site/src/Repository/AccessTokenRepository.php new file mode 100644 index 0000000..656a654 --- /dev/null +++ b/com_oauthserver/site/src/Repository/AccessTokenRepository.php @@ -0,0 +1,40 @@ +setMVCFactory($MVCFactory); + } + + /** + * @param $clientIdentifier + * @return \League\OAuth2\Server\Entities\ClientEntityInterface + * @throws \Exception + * @since version + */ + public function getClientEntity($clientIdentifier): ClientEntityInterface + { + /** @var \Webmasterskaya\Component\OauthServer\Administrator\Table\ClientTable $table */ + $table = $this->getMVCFactory()->createTable('Client', 'Administrator'); + $table->load(['identifier' => $clientIdentifier]); + return $table; + } + + public function validateClient($clientIdentifier, $clientSecret, $grantType) + { + // TODO: Implement validateClient() method. + } +} \ No newline at end of file diff --git a/com_oauthserver/site/src/Repository/RefreshTokenRepository.php b/com_oauthserver/site/src/Repository/RefreshTokenRepository.php new file mode 100644 index 0000000..31ec9e3 --- /dev/null +++ b/com_oauthserver/site/src/Repository/RefreshTokenRepository.php @@ -0,0 +1,30 @@ +