Skip to main content
Skip table of contents

CsrfTokenModel

[]

implements: method, scalar
bundle: standard portal bundle
since 2.3.4

All accessible elements are defined in the global namespace 'custom.portal.csrfToken' and therefore prefixed with it.

custom.portal.csrfToken ↦ String
a signed timestamp that needs to be present in later submissions

Methods

custom.portal.csrfToken(String:secret, String:algorithm)String
since 2.3.4
Allow to switch secret and algorithm (optional) in use.
The default algorithm is configured in SiteConfiguration, fallback is 'SHA-256'.

  • Example:
    'custom.portal.csrfToken' - get token as string, use defaults
    'custom.portal.csrfToken("mysecret")' - overwriting shared secret
    'custom.portal.csrfToken("mysecret", "sha-1")' - overwriting shared secret and default algorithm
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.