CSRFVerifyToken()
Validates the given token against the same stored in the session for a specific key.
CSRFVerifyToken( token=string, key=string );
Returns: Boolean
Argument | Description |
---|---|
token
string,
required
|
Token that to be validated against the token stored in the session. |
key
string,
optional
|
The key against which the token be searched. |
Examples
key = "+nn7jqV+3hYHM++RuvE47g==";
new_token = CSRFGenerateToken(key, true);
dump(CSRFVerifyToken(new_token,key)); //true
See also
- Cryptography
- CSRFGenerateToken()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)