Lucee Function Reference
Function CSRFGENERATETOKEN
Provides a random token and stores it in the session. You can also provide a specific key to store in the session.
Example
csrfgeneratetoken([string key,[boolean forceNew]]):string
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Description |
---|---|---|---|
key | string | No | A random token is generated for the key provided. |
forceNew | boolean | No |
If set to true, a new token is generated every time the function is called. If false, in case a token exists for the key, the same key is returned. |