public interface SecurityRequirement extends Constructible, Map<String,List<String>>
| Modifier and Type | Method and Description |
|---|---|
SecurityRequirement |
addScheme(String securitySchemeName)
Adds a security scheme to the SecurityRequirement instance based on the scheme name.
|
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.
|
SecurityRequirement |
addScheme(String securitySchemeName,
String scope)
Adds a security scheme to the SecurityRequirement instance based on the scheme name and
required scope (optional) provided.
|
boolean |
containsKey(Object key)
Deprecated.
since 1.1
|
List<String> |
get(Object key)
Deprecated.
since 1.1
|
default List<String> |
getScheme(String securitySchemeName)
Returns a list of scopes for a given scheme name.
|
Map<String,List<String>> |
getSchemes()
Returns a copy map (potentially immutable) of the schemes.
|
default boolean |
hasScheme(String securitySchemeName)
Check whether a scheme is present in the map.
|
List<String> |
put(String key,
List<String> value)
Deprecated.
since 1.1
|
void |
putAll(Map<? extends String,? extends List<String>> m)
Deprecated.
since 1.1
|
List<String> |
remove(Object key)
Deprecated.
since 1.1
|
void |
removeScheme(String securitySchemeName)
Removes a security scheme to the SecurityRequirement instance based on the scheme name.
|
void |
setSchemes(Map<String,List<String>> items)
Set all security schemes to the SecurityRequirement instance.
|
clear, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, valuesSecurityRequirement addScheme(String securitySchemeName, String scope)
securitySchemeName - the name of security scheme declared in the Components section of the OpenAPI documentscope - a required scope - only valid when the defined scheme's type is 'oauth2' or 'openIdConnect'. passing null will
result in an empty list of scopesSecurityRequirement addScheme(String securitySchemeName, List<String> scopes)
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'. passing null
will result in an empty list of scopesSecurityRequirement addScheme(String securitySchemeName)
securitySchemeName - the name of security scheme declared in the Components section of the OpenAPI documentvoid removeScheme(String securitySchemeName)
securitySchemeName - the name of security schemeMap<String,List<String>> getSchemes()
void setSchemes(Map<String,List<String>> items)
items - a map containing the security schemes.default boolean hasScheme(String securitySchemeName)
getSchemes().containsKey(name)securitySchemeName - the name of security schemedefault List<String> getScheme(String securitySchemeName)
getSchemes().get(name)securitySchemeName - the name of security scheme@Deprecated List<String> get(Object key)
SecurityRequirement will no longer extends Map, this method will no longer be present.
Use getScheme(String) instead.@Deprecated boolean containsKey(Object key)
SecurityRequirement will no longer extends Map, this method will no longer be present.
Use hasScheme(String) instead.containsKey in interface Map<String,List<String>>@Deprecated List<String> put(String key, List<String> value)
SecurityRequirement will no longer extends Map, this method will no longer be present.
Use addScheme(String, List) instead.@Deprecated void putAll(Map<? extends String,? extends List<String>> m)
SecurityRequirement will no longer extends Map, this method will no longer be present.
Use setSchemes(Map) instead.@Deprecated List<String> remove(Object key)
SecurityRequirement will no longer extends Map, this method will no longer be present.
Use removeScheme(String) instead.Copyright © 2017 – 2021 Eclipse Foundation. All rights reserved.
Use is subject to license terms.