Interface SecurityRequirement

All Superinterfaces:
Constructible, Map<String,List<String>>

public interface SecurityRequirement extends Constructible, Map<String,List<String>>
SecurityRequirement
See Also:
  • Method Details

    • addScheme

      SecurityRequirement addScheme(String securitySchemeName, String scope)
      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 document
      scope - a required scope - only valid when the defined scheme is 'oauth2' or 'openIdConnect'
      Returns:
      Updated SecurityRequirement instance
    • addScheme

      SecurityRequirement addScheme(String securitySchemeName, List<String> scopes)
      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 document
      scopes - the scopes required - only valid when the defined scheme is 'oauth2' or 'openIdConnect'
      Returns:
      Updated SecurityRequirement instance
    • addScheme

      SecurityRequirement addScheme(String securitySchemeName)
      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