UnauthenticatedException
extends RuntimeException
in package
Exception thrown when user is not authenticated but authentication is required.
This exception should be caught at the application/framework level and handled appropriately (typically by redirecting to login page).
Table of Contents
Properties
- $_intendedUrl : string
- $_redirectUrl : string
Methods
- __construct() : mixed
- getIntendedUrl() : string
- Get original URL user was trying to access
- getRedirectUrl() : string
- Get URL to redirect to (login page)
Properties
$_intendedUrl
private
string
$_intendedUrl
$_redirectUrl
private
string
$_redirectUrl
Methods
__construct()
public
__construct(string $redirectUrl, string $intendedUrl[, string $message = 'Authentication required' ]) : mixed
Parameters
- $redirectUrl : string
-
URL to redirect to (typically login page)
- $intendedUrl : string
-
Original URL user was trying to access
- $message : string = 'Authentication required'
-
Technical message for logging
getIntendedUrl()
Get original URL user was trying to access
public
getIntendedUrl() : string
Return values
stringgetRedirectUrl()
Get URL to redirect to (login page)
public
getRedirectUrl() : string