CSRFGenerateToken

Provides a random token and stores it in the session. You can also provide a specific key to store in the session.

Returns: string

Usage

CSRFGenerateToken( [ key [, forceNew ] ] )

Arguments

Argument Description
key
(string, optional)

A random token is generated for the key provided.

forceNew
(boolean, optional)

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

dump(CSRFGenerateToken("+nn7jqV+3hYHM++RuvE47g==", true));