Documentation

SecurityScheme
in package
implements OpenApiAttributeInterface

The attribute may be used at class level (also on multiple classes) to add securitySchemes to spec components section.

Interfaces, Classes, Traits and Enums

OpenApiAttributeInterface

Table of Contents

$bearerFormat  : string
$description  : string
$extensions  : array<string|int, mixed>
$flows  : OAuthFlows|null
$in  : SecuritySchemeIn|null
$name  : string
$openIdConnectUrl  : string
$paramName  : string
$ref  : string
$scheme  : string
$type  : SecuritySchemeType|null
__construct()  : mixed

Properties

Methods

__construct()

public __construct([SecuritySchemeType|null $type = null ][, string $name = "" ][, string $description = "" ][, string $paramName = "" ][, SecuritySchemeIn|null $in = null ][, string $scheme = "" ][, string $bearerFormat = "" ][, OAuthFlows|null $flows = null ][, string $openIdConnectUrl = "" ][, array<string|int, mixed> $extensions = [] ][, string $ref = "" ]) : mixed
Parameters
$type : SecuritySchemeType|null = null

The type of the security scheme. Valid values are "apiKey", "http", "oauth2", "openIdConnect".

$name : string = ""

The name identifying this security scheme

$description : string = ""

A short description for security scheme. CommonMark syntax can be used for rich text representation.

$paramName : string = ""

The name of the header or query parameter to be used. Applies to apiKey type. Maps to "name" property of Security Scheme (OpenAPI specification).

$in : SecuritySchemeIn|null = null

The location of the API key. Valid values are "query" or "header". Applies to apiKey type.

$scheme : string = ""

The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC 7235. Applies to http type.

$bearerFormat : string = ""

A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. Applies to http ("bearer") type.

$flows : OAuthFlows|null = null

Required. An object containing configuration information for the flow types supported. Applies to oauth2 type.

$openIdConnectUrl : string = ""

Required. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. Applies to openIdConnect.

$extensions : array<string|int, mixed> = []

The list of optional extensions.

$ref : string = ""

A reference to a SecurityScheme defined in components securitySchemes.

Return values
mixed

Search results