mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Первичное портирование логики сервера авторизации с PhalconPHP на Yii2
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace api\modules\authserver\exceptions;
|
||||
|
||||
use yii\web\HttpException;
|
||||
|
||||
class AuthserverException extends HttpException {
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace api\modules\authserver\exceptions;
|
||||
|
||||
class ForbiddenOperationException extends AuthserverException {
|
||||
|
||||
public function __construct($message, $code = 0, \Exception $previous = null) {
|
||||
parent::__construct($status = 401, $message, $code, $previous);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace api\modules\authserver\exceptions;
|
||||
|
||||
class IllegalArgumentException extends AuthserverException {
|
||||
|
||||
public function __construct($status = null, $message = null, $code = 0, \Exception $previous = null) {
|
||||
parent::__construct(400, 'credentials can not be null.', $code, $previous);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user