Skip to content

SecurityDecision

The outcome of the security check for an action: run it, or forward somewhere else.

Produced by SecurityService and SecurityMiddleware and recorded on ExecutionState::$securityDecision, where the cache layer stores and replays it with the rest of the execution state.

Allow means the action is not secure, security is globally disabled, or the user satisfied it. LoginForward means the user is not authenticated and the configured login action is dispatched instead. SecureForward means the user is authenticated but lacks a credential the action requires, and the configured secure action is dispatched instead.

enum SecurityDecision: string

SourceExecution/SecurityDecision.php
CaseValueDescription
Allow'allow'
LoginForward'login'
SecureForward'secure'
PropertyTypeDescription
$namestringreadonly.
$valuestringreadonly.
MethodDescription
cases(): array
[`from(stringint $value): static`](#from)
[`tryFrom(stringint $value): ?static`](#tryfrom)

public static function cases(): array

Returns array

public static function from(string|int $value): static

ParameterTypeDescription
$value`string““int`

Returns static

public static function tryFrom(string|int $value): ?static

ParameterTypeDescription
$value`string““int`

Returns ?``static