InvalidAuthTokenException
class InvalidAuthTokenException extends AuthorizationException
Properties
| protected Response|null | $response | The authorization response returned by the gate. |
from AuthorizationException |
| protected int|null | $status | The HTTP response status code. |
from AuthorizationException |
Methods
Create a new authorization exception instance.
Set the HTTP response status code.
Set the HTTP response status code to 404.
Create a deny response object from this exception.
Create a new InvalidAuthTokenException for different auth tokens.
Details
in
AuthorizationException at line 25
__construct(string|null $message = null, int|string|null $code = null, Throwable|null $previous = null)
Create a new authorization exception instance.
in
AuthorizationException at line 35
Response|null
response()
Get the response from the gate.
in
AuthorizationException at line 45
AuthorizationException
setResponse(Response|null $response)
Set the response from the gate.
in
AuthorizationException at line 57
AuthorizationException
withStatus(int|null $status)
Set the HTTP response status code.
in
AuthorizationException at line 69
AuthorizationException
asNotFound()
Set the HTTP response status code to 404.
in
AuthorizationException at line 77
bool
hasStatus()
Determine if the HTTP status code has been set.
in
AuthorizationException at line 85
int|null
status()
Get the HTTP status code.
in
AuthorizationException at line 93
Response
toResponse()
Create a deny response object from this exception.
at line 14
static InvalidAuthTokenException
different()
Create a new InvalidAuthTokenException for different auth tokens.