Interface SecurityRequirement
- All Superinterfaces:
Constructible
,Map<String,
List<String>>
SecurityRequirement
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a security scheme to the SecurityRequirement instance based on the scheme name.Adds a security scheme to the SecurityRequirement instance based on the scheme name and required scope (optional) provided.Adds a security scheme to the SecurityRequirement instance based on the scheme name and required scopes (optional) provided.Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
addScheme
Adds a security scheme to the SecurityRequirement instance based on the scheme name and required scope (optional) provided.- Parameters:
securitySchemeName
- the name of security scheme declared in the Components section of the OpenAPI documentscope
- a required scope - only valid when the defined scheme is 'oauth2' or 'openIdConnect'- Returns:
- Updated SecurityRequirement instance
-
addScheme
Adds a security scheme to the SecurityRequirement instance based on the scheme name and required scopes (optional) provided.- Parameters:
securitySchemeName
- the name of security scheme declared in the Components section of the OpenAPI documentscopes
- the scopes required - only valid when the defined scheme is 'oauth2' or 'openIdConnect'- Returns:
- Updated SecurityRequirement instance
-
addScheme
Adds a security scheme to the SecurityRequirement instance based on the scheme name. No scopes are included, resulting in an empty list of scopes for the security scheme. This is valid when the defined security scheme is not 'oauth2' or 'openIdConnect'.- Parameters:
securitySchemeName
- the name of security scheme declared in the Components section of the OpenAPI document- Returns:
- Updated SecurityRequirement instance
-