CSRFGenerateToken
Method Signature
CSRFGenerateToken(key=[string], forceNew=[boolean])Arguments
Argument
Type
Required
Description
Default
Examples
Related
Last updated
Was this helpful?
Generates a random token and stores it in the session cache to protect against Cross-Site Request Forgery (CSRF) attacks.
You can optionally provide a specific key to store in the cache, and optionally force the generation of a new token.
CSRFGenerateToken(key=[string], forceNew=[boolean])key
string
false
The key to store the token under in the cache. Defaults to "default".
default
forceNew
boolean
false
If true, a new token will be generated and stored in the cache. Defaults to false.
false
Last updated
Was this helpful?
Was this helpful?
