SecurityRequirement
in package
implements
OpenApiAttributeInterface
The attribute may be applied at class or method level, or in {@see \OpenApi\Attributes\Operation::$security} to define security requirements for the single operation (when applied at method level) or for all operations of a class (when applied at class level).
It can also be used in OpenAPIDefinition::$security to define spec level security.
Interfaces, Classes, Traits and Enums
Table of Contents
- $name : string
- $scopes : array<string|int, mixed>
- __construct() : mixed
Properties
$name
public
string
$name
$scopes
public
array<string|int, mixed>
$scopes
= []
Methods
__construct()
public
__construct(string $name[, array<string|int, string> $scopes = [] ]) : mixed
Parameters
- $name : string
-
This name must correspond to a declared SecurityRequirement.
- $scopes : array<string|int, string> = []
-
If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution. For other security scheme types, the array must be empty.