security [@since 9.1]
Security exposes security related settings.
import security from "@sitevision/api/common/security";
csrf exposes a couple of methods for settings related to csrf-protection.
Used to acquire the current csrf-token. If the user is anonymous or if csrf-protection is disabled on the server this will return null.
Used to acquire the parameter name that should be used when passing the token as a form field.
Used to acquire the header name that should be used when passing the token as a request header.
Tip! If you are using the requester when doing xhr-requests then all this will be taken care of automatically.