Documentation

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

OpenApiAttributeInterface

Table of Contents

$name  : string
$scopes  : array<string|int, mixed>
__construct()  : mixed

Properties

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.

Return values
mixed

Search results