Description
Provides a random token and stores it in the session. You can also provide a specific key to store in the session.
Returns
Token
Category
Display and formatting functions
Syntax
CSRFGenerateToken([key] [,forceNew])
See also
History
ColdFusion 10: Added this function.
Parameters
Parameter |
Required\Optional |
Description |
---|---|---|
key |
optional |
A random token is generated based on the key provided. This key is stored in the session. |
forceNew |
optional |
If set to true, a new token is generated every time the method is called. If false, in case a token exists for the key, the same key is returned. |
Usage
Use this function to create a random token and store it in the session.