CSRF token

A secret value tied to the user's session that must accompany each state-changing request, which another website cannot read or guess.

In more detail

The token is usually tied to the user's session and sent in a hidden form field or a custom header. Another site cannot read the token, so it cannot forge a valid request even though the browser sends the cookies.

Example

The course's fixed handler accepts a change only when the cookie matches the session and the token matches the one issued with the form.

Related terms

Taught in

References