VerifyCsrfToken
class VerifyCsrfToken
Properties
protected Application | $app | The application instance. |
|
protected Encrypter | $encrypter | The encrypter implementation. |
|
protected array | $except | The URIs that should be excluded from CSRF verification. |
Methods
void
bool
runningUnitTests()
Determine if the application is running unit tests.
bool
inExceptArray(Request $request)
Determine if the request has a URI that should pass through CSRF verification.
bool
string
Response
addCookieToResponse(Request $request, Response $response)
Add the CSRF token to the response cookies.
Details
at line 42
void
__construct(Application $app, Encrypter $encrypter)
Create a new middleware instance.
at line 77
protected bool
isReading(Request $request)
Determine if the HTTP request uses a ‘read’ verb.
at line 87
protected bool
runningUnitTests()
Determine if the application is running unit tests.
at line 98
protected bool
inExceptArray(Request $request)
Determine if the request has a URI that should pass through CSRF verification.
at line 119
protected bool
tokensMatch(Request $request)
Determine if the session and input CSRF tokens match.
at line 134
protected string
getTokenFromRequest(Request $request)
Get the CSRF token from the request.
at line 152
protected Response
addCookieToResponse(Request $request, Response $response)
Add the CSRF token to the response cookies.