Documentation

AuthMiddleware extends BaseMiddleware
in package

FinalYes

AuthMiddleware

This middleware is responsible for checking if a user is authenticated. If the user is not authenticated, it will throw a ForbiddenException.

Table of Contents

Properties

$actions  : array<string|int, mixed>

Methods

__construct()  : mixed
AuthMiddleware constructor
execute()  : void
Executes the middleware.

Properties

Methods

__construct()

AuthMiddleware constructor

public __construct([array<string|int, mixed> $actions = [] ]) : mixed
Parameters
$actions : array<string|int, mixed> = []

List of actions that do not require authentication

execute()

Executes the middleware.

public execute() : void

This method will check if the user is authenticated. If the user is not authenticated, it will throw a ForbiddenException.

Tags
throws
ForbiddenException

If the user is not authenticated.

On this page

Search results