CSRFGenerateToken()
Provides a random token and stores it in the session. You can also provide a specific key to store in the session.
CSRFGenerateToken( key=string, forceNew=boolean );
Returns: String
| Argument | Description |
|---|---|
|
key
string,
optional
|
edit
A random token is generated for the key provided. |
|
forceNew
boolean,
optional
|
edit
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. |
Examples
editdump(CSRFGenerateToken("+nn7jqV+3hYHM++RuvE47g==", true));
See also
- Cryptography
- Session
- CSRFVerifyToken()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)