AuthenticationException
extends Exception
in package
Exception thrown when an unauthenticated user attempts to access a protected resource
Used by AuthManager::requireAuthentication() when a user is not logged in. HTTP status code: 401 Unauthorized
Tags
Table of Contents
Methods
- __construct() : mixed
Methods
__construct()
public
__construct([string $message = 'Authentication required' ][, int $code = 401 ][, Throwable|null $previous = null ]) : mixed
Parameters
- $message : string = 'Authentication required'
-
Error message
- $code : int = 401
-
HTTP status code (default: 401)
- $previous : Throwable|null = null
-
Previous exception for chaining