Interface SecurityRequirement

  • All Superinterfaces:
    Constructible, java.util.Map<java.lang.String,java.util.List<java.lang.String>>


    public interface SecurityRequirement
    extends Constructible, java.util.Map<java.lang.String,java.util.List<java.lang.String>>
    SecurityRequirement
    See Also:
    SecurityRequirement Object
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,V extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      SecurityRequirement addScheme​(java.lang.String securitySchemeName)
      Adds a security scheme to the SecurityRequirement instance based on the scheme name.
      SecurityRequirement addScheme​(java.lang.String securitySchemeName, java.lang.String scope)
      Adds a security scheme to the SecurityRequirement instance based on the scheme name and required scope (optional) provided.
      SecurityRequirement addScheme​(java.lang.String securitySchemeName, java.util.List<java.lang.String> scopes)
      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, entry, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, of, of, of, of, of, of, of, of, of, of, of, ofEntries, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
    • Method Detail

      • addScheme

        SecurityRequirement addScheme​(java.lang.String securitySchemeName,
                                      java.lang.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​(java.lang.String securitySchemeName,
                                      java.util.List<java.lang.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​(java.lang.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