Form security: theme data reference
Reading the data tables. Presence varies by page and state; this is not a requirement to populate every field.
| Field | Type | Meaning | Availability |
|---|---|---|---|
viewModel.security |
object | Security data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.security.csrf |
object | Csrf data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.security.csrf.fieldName |
string | Field name value supplied for this context. | Added by the storefront render decoration. Use inside forms or requests for the current session. |
viewModel.security.csrf.headerName |
string | Header name value supplied for this context. | Added by the storefront render decoration. Use inside forms or requests for the current session. |
viewModel.security.csrf.inputHtml |
string | Prepared hidden CSRF input; output as HTML inside POST forms. | Added by the storefront render decoration. Use inside forms or requests for the current session. |
viewModel.security.csrf.token |
string | Token value supplied for this context. | Added by the storefront render decoration. Use inside forms or requests for the current session. |
viewModel.security.storefrontAccess |
object | Storefront access data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.security.storefrontAccess.canUseCart |
boolean | Whether use cart applies; use for display only. | Added by the storefront access policy; the theme consumes these decisions. |
viewModel.security.storefrontAccess.canViewPrices |
boolean | Whether view prices applies; use for display only. | Added by the storefront access policy; the theme consumes these decisions. |
viewModel.security.storefrontAccess.catalogModeEnabled |
boolean | Whether catalog mode enabled applies; use for display only. | Added by the storefront access policy; the theme consumes these decisions. |
viewModel.security.storefrontAccess.isAuthenticated |
boolean | Whether authenticated applies; use for display only. | Added by the storefront access policy; the theme consumes these decisions. |
viewModel.security.storefrontAccess.storefrontLoginRequired |
boolean | Whether storefront login required applies; use for display only. | Added by the storefront access policy; the theme consumes these decisions. |