diff --git a/src/Core/Controller/AbstractController.php b/src/Core/Controller/AbstractController.php index 8d51736d..23cca45d 100644 --- a/src/Core/Controller/AbstractController.php +++ b/src/Core/Controller/AbstractController.php @@ -230,7 +230,7 @@ public function hmvc($task, $input = null, $package = null) } /** - * Prepare execute hook. + * A hook before main process executing. * * @return void */ @@ -239,14 +239,14 @@ protected function prepareExecute() } /** - * Do execute action. + * The main execution process. * * @return mixed */ abstract protected function doExecute(); /** - * Post execute hook. + * A hook after main process executing. * * @param mixed $result The result content to return, can be any value or boolean. * diff --git a/src/Core/Security/Exception/InvalidTokenException.php b/src/Core/Security/Exception/InvalidTokenException.php index d4735cd8..5e5a8ae1 100644 --- a/src/Core/Security/Exception/InvalidTokenException.php +++ b/src/Core/Security/Exception/InvalidTokenException.php @@ -13,6 +13,6 @@ * * @since 2.1.1 */ -class InvalidTokenException extends \RuntimeException +class InvalidTokenException extends UnauthorizedException { } diff --git a/src/Core/Security/Exception/UnauthorizedException.php b/src/Core/Security/Exception/UnauthorizedException.php new file mode 100644 index 00000000..411ec10d --- /dev/null +++ b/src/Core/Security/Exception/UnauthorizedException.php @@ -0,0 +1,28 @@ +