Implementation of the backend for the OAuth2 clients management

This commit is contained in:
ErickSkrauch
2018-02-28 01:27:35 +03:00
parent ddec87e3a9
commit 673429e577
55 changed files with 1810 additions and 65 deletions

View File

@@ -0,0 +1,8 @@
<?php
namespace api\modules\oauth\exceptions;
use yii\base\Exception;
class InvalidOauthClientState extends Exception implements OauthException {
}

View File

@@ -0,0 +1,7 @@
<?php
declare(strict_types=1);
namespace api\modules\oauth\exceptions;
interface OauthException {
}

View 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;
}
}