Whatever message this page gives is out now! Go check it out!

CSRFVerifyToken

Last update:
May 18, 2026

Description

Validates the given token against the same stored in the session for a specific key.

Returns

a Boolean value. true is successful.

Category

Display and formatting functions

Syntax

CSRFVerifyToken(token [,key])

See also

History

ColdFusion 10: Added this function.

Parameters

Parameter
Required\Optional
Description
token
required
Token that to be validated against the token stored in the session.
key
Optional
The key against which the token be searched.

Usage

Use this function to validate the given token against the same stored in the session for a specific key.

Example

<cfset token=form.token> 
<cfset validate = CSRFverifyToken(token)> 
<cfoutput >#validate#</cfoutput>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page