Open
Description
Description
Evaluate the security attributes when building the openAPI documentation. This for Resources and Operations.
Example
<?php
// ApiPlatform\OpenApi\Factory\OpenApiFactory
// inside function collectPaths
if (null !== $security = $operation->getSecurity()) {
$variables = [
'trust_resolver' => $this->authenticationTrustResolver,
'auth_checker' => $this->authorizationChecker, // needed for the is_granted expression function
];
$granted = (bool) $this->expressionLanguage->evaluate($security, $variables);
if (!$granted) {
continue;
}
}