Annotation Type SecurityScheme
-
@Target({TYPE,ANNOTATION_TYPE}) @Retention(RUNTIME) @Repeatable(SecuritySchemes.class) @Inherited public @interface SecurityScheme
The annotation may be used at class level (also on multiple classes) to add securitySchemes to spec components section.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description SecuritySchemeType
type
The type of the security scheme.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
bearerFormat
A hint to the client to identify how the bearer token is formatted.String
description
A short description for security scheme.Extension[]
extensions
The list of optional extensionsOAuthFlows
flows
Required.SecuritySchemeIn
in
The location of the API key.String
name
The name identifying this security schemeString
openIdConnectUrl
Required.String
paramName
The name of the header or query parameter to be used.String
ref
A reference to a SecurityScheme defined in components securitySchemes.String
scheme
The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC 7235.
-
-
-
Element Detail
-
type
SecuritySchemeType type
The type of the security scheme. Valid values are "apiKey", "http", "oauth2", "openIdConnect".- Returns:
- String type
-
-
-
name
String name
The name identifying this security scheme- Returns:
- String name
- Default:
- ""
-
-
-
description
String description
A short description for security scheme. CommonMark syntax can be used for rich text representation.- Returns:
- String description
- Default:
- ""
-
-
-
paramName
String paramName
The name of the header or query parameter to be used. Applies to apiKey type. Maps to "name" property of Security Scheme (OpenAPI specification)- Returns:
- String paramName
- Default:
- ""
-
-
-
in
SecuritySchemeIn in
The location of the API key. Valid values are "query" or "header". Applies to apiKey type.- Returns:
- String in
- Default:
- io.swagger.v3.oas.annotations.enums.SecuritySchemeIn.DEFAULT
-
-
-
scheme
String scheme
The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC 7235. Applies to http type.- Returns:
- String scheme
- Default:
- ""
-
-
-
bearerFormat
String bearerFormat
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.- Returns:
- String bearerFormat
- Default:
- ""
-
-
-
flows
OAuthFlows flows
Required. An object containing configuration information for the flow types supported. Applies to oauth2 type.- Returns:
- OAuthFlows flows
- Default:
- @io.swagger.v3.oas.annotations.security.OAuthFlows
-
-
-
openIdConnectUrl
String openIdConnectUrl
Required. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. Applies to openIdConnect.- Returns:
- String openIdConnectUrl
- Default:
- ""
-
-
-
extensions
Extension[] extensions
The list of optional extensions- Returns:
- an optional array of extensions
- Default:
- {}
-
-
-
ref
String ref
A reference to a SecurityScheme defined in components securitySchemes.- Returns:
- the reference
- Since:
- 2.0.3
- Default:
- ""
-
-