SessionCSRF::resetToken()

Clear out token value

In signed mode, resetting a token that has no session-based state rotates the binding cookie, which invalidates all signed tokens previously issued to the client, including those in forms open in the user's other tabs.

Usage

// basic usage
$sessionCSRF->resetToken();

// usage with all arguments
$sessionCSRF->resetToken($id = '');

Arguments

NameType(s)Description
$id (optional)int string null

Optional unique ID for this token


SessionCSRF methods and properties

API reference based on ProcessWire core version 3.0.275