Annotation Interface OpenApi.SecurityScheme
- Enclosing class:
OpenApi
Supported type() values are apiKey, http, mutualTLS, oauth2, and
openIdConnect. The apiKey type requires apiKeyName() and in() with
query, header, or cookie. The http type requires scheme(). The
mutualTLS type has no additional required fields but requires OpenAPI 3.1 or 3.2 output; generation fails
when the selected document provider produces OpenAPI 3.0. The oauth2 type requires flows() with
at least one configured flow.
The openIdConnect type requires openIdConnectUrl().
Declarative OpenAPI generation rejects fields that do not apply to the selected type().
Prefer the type-specific annotations such as OpenApi.ApiKeySecurityScheme, OpenApi.HttpSecurityScheme,
OpenApi.MutualTlsSecurityScheme, OpenApi.OAuth2SecurityScheme, and OpenApi.OidcSecurityScheme when they match
the security scheme you need.
Use only on @OpenApi.Document metadata types.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionAPI key parameter name.Bearer format.booleanWhether the security scheme is deprecated.Security scheme description.OAuth flows.API key location.OpenAPI 3.2 OAuth 2 metadata URL.OpenID Connect discovery URL.HTTP authorization scheme.
-
Element Details
-
name
-
type
String typeScheme type. Supported values areapiKey,http,mutualTLS,oauth2, andopenIdConnect.- Returns:
- type
-
description
-
apiKeyName
-
scheme
-
bearerFormat
-
in
-
flows
OpenApi.OAuthFlows flowsOAuth flows. Valid only whentype()isoauth2, where at least one flow must be configured.- Returns:
- OAuth flows
- Default:
@io.helidon.openapi.OpenApi.OAuthFlows
-
openIdConnectUrl
-
oauth2MetadataUrl
-
deprecated
boolean deprecatedWhether the security scheme is deprecated.Rendered only for OpenAPI 3.2 output.
- Returns:
- deprecated flag
- Default:
false
-