mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Implementation of the backend for the OAuth2 clients management
This commit is contained in:
8
api/modules/oauth/exceptions/InvalidOauthClientState.php
Normal file
8
api/modules/oauth/exceptions/InvalidOauthClientState.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace api\modules\oauth\exceptions;
|
||||
|
||||
use yii\base\Exception;
|
||||
|
||||
class InvalidOauthClientState extends Exception implements OauthException {
|
||||
|
||||
}
|
||||
7
api/modules/oauth/exceptions/OauthException.php
Normal file
7
api/modules/oauth/exceptions/OauthException.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace api\modules\oauth\exceptions;
|
||||
|
||||
interface OauthException {
|
||||
}
|
||||
23
api/modules/oauth/exceptions/UnsupportedOauthClientType.php
Normal file
23
api/modules/oauth/exceptions/UnsupportedOauthClientType.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
namespace api\modules\oauth\exceptions;
|
||||
|
||||
use Throwable;
|
||||
use yii\base\Exception;
|
||||
|
||||
class UnsupportedOauthClientType extends Exception implements OauthException {
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $type;
|
||||
|
||||
public function __construct(string $type, int $code = 0, Throwable $previous = null) {
|
||||
parent::__construct('Unsupported oauth client type', $code, $previous);
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user