getCsrfToken

View Source

Summary

Gets the CSRF token from the session. Creates one if missing.

Signature

function getCsrfToken(context: RequestContext, tokenKey: string): string;

Params

context

Request context with a started session

tokenKey

Session key that stores the token

Returns

The active CSRF token