CKFinder 3 – PHP Connector Documentation
DoubleSubmitCookieTokenValidator Class Reference
Inheritance diagram for DoubleSubmitCookieTokenValidator:
TokenValidatorInterface

Public Member Functions

 __construct ($tokenParamName='ckCsrfToken', $tokenCookieName='ckCsrfToken', $minTokenLength=32)
 
 validate (Request $request)
 
 validate (Request $request)
 

Protected Attributes

 $tokenParamName
 
 $tokenCookieName
 
 $minTokenLength
 

Detailed Description

The DoubleSubmitCookieTokenValidator class.

Checks if the request contains a valid token that matches the value sent in the cookie.

See also
https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet#Double_Submit_Cookies

Constructor & Destructor Documentation

◆ __construct()

__construct (   $tokenParamName = 'ckCsrfToken',
  $tokenCookieName = 'ckCsrfToken',
  $minTokenLength = 32 
)

DoubleSubmitCookieTokenValidator constructor.

Parameters
string$tokenParamName
string$tokenCookieName
int$minTokenLength

Member Function Documentation

◆ validate()

validate ( Request  $request)

Checks if the request contains a valid CSRF token.

Returns
bool true if the token is valid, false otherwise

Implements TokenValidatorInterface.


The documentation for this class was generated from the following file: