Первичное портирование логики сервера авторизации с PhalconPHP на Yii2

This commit is contained in:
ErickSkrauch committed 2016-08-21 02:23:48 +03:00
1 parent d0fcc8cd6f
commit b57b015f66
24 files changed
+573 -9

No files matched your search

@@ -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);
}
}