Class SecurityScheme
Supported schemes are basic authentication, an API key (either as a header or as a query parameter) and OAuth2's common flows (implicit, password, application and access code).
Example:
See Also:
-
Constructor Summary
ConstructorDescriptionDefault constructor.SecurityScheme
(SecurityScheme copyFrom) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionBean property appender:scopes .copy()
Make a deep copy of this object.<T> T
Generic property getter.Bean property getter:authorizationUrl .Bean property getter:description .getFlow()
Bean property getter:flow .getIn()
Bean property getter:in .getName()
Bean property getter:name .Bean property getter:scopes .Bean property getter:tokenUrl .getType()
Bean property getter:type .keySet()
Returns all the keys on this element.Generic property setter.setAuthorizationUrl
(String value) Bean property setter:authorizationUrl .setDescription
(String value) Bean property setter:description .Bean property setter:flow .Bean property setter:in .Bean property setter:name .Bean property setter:scopes .setTokenUrl
(String value) Bean property setter:tokenUrl .Bean property setter:type .protected SecurityScheme
strict()
Sets strict mode on this bean.
-
Constructor Details
-
SecurityScheme
public SecurityScheme()Default constructor. -
SecurityScheme
Copy constructor.- Parameters:
copyFrom
- The object to copy.
-
-
Method Details
-
copy
Make a deep copy of this object.- Returns:
- A deep copy of this object.
-
strict
Description copied from class:SwaggerElement
Sets strict mode on this bean.- Overrides:
strict
in classSwaggerElement
- Returns:
- This object.
-
getAuthorizationUrl
Bean property getter:authorizationUrl .The authorization URL to be used for this flow.
- Returns:
- The property value, or
null if it is not set.
-
setAuthorizationUrl
Bean property setter:authorizationUrl .The authorization URL to be used for this flow.
- Parameters:
value
- The new value for this property.
This SHOULD be in the form of a URL.
Can benull to unset the property.- Returns:
- This object.
-
getDescription
Bean property getter:description .A short description for security scheme.
- Returns:
- The property value, or
null if it is not set.
-
setDescription
Bean property setter:description .A short description for security scheme.
- Parameters:
value
- The new value for this property.
Can benull to unset the property.- Returns:
- This object.
-
getFlow
Bean property getter:flow .The flow used by the OAuth2 security scheme.
- Returns:
- The property value, or
null if it is not set.
-
setFlow
Bean property setter:flow .The flow used by the OAuth2 security scheme.
- Parameters:
value
- The new value for this property.
Valid values:"implicit" "password" "application" "accessCode"
Can benull to unset the property.- Returns:
- This object.
-
getIn
Bean property getter:in .The location of the API key.
- Returns:
- The property value, or
null if it is not set.
-
setIn
Bean property setter:in .The location of the API key.
- Parameters:
value
- The new value for this property.
Valid values:"query" "header"
Can benull to unset the property.- Returns:
- This object.
-
getName
Bean property getter:name .The name of the header or query parameter to be used.
- Returns:
- The property value, or
null if it is not set.
-
setName
Bean property setter:name .The name of the header or query parameter to be used.
- Parameters:
value
- The new value for this property.
Can benull to unset the property.- Returns:
- This object.
-
getScopes
Bean property getter:scopes .The available scopes for the OAuth2 security scheme.
- Returns:
- The property value, or
null if it is not set.
-
setScopes
Bean property setter:scopes .The available scopes for the OAuth2 security scheme.
- Parameters:
value
- The new value for this property.
Can benull to unset the property.- Returns:
- This object.
-
addScope
Bean property appender:scopes .The available scopes for the OAuth2 security scheme.
- Parameters:
key
- The scope key.value
- The scope value.- Returns:
- This object.
-
getTokenUrl
Bean property getter:tokenUrl .The token URL to be used for this flow.
- Returns:
- The property value, or
null if it is not set.
-
setTokenUrl
Bean property setter:tokenUrl .The token URL to be used for this flow.
- Parameters:
value
- The new value for this property.
This SHOULD be in the form of a URL.
Can benull to unset the property.- Returns:
- This object.
-
getType
Bean property getter:type .The type of the security scheme.
- Returns:
- The property value, or
null if it is not set.
-
setType
Bean property setter:type .The type of the security scheme.
- Parameters:
value
- The new value for this property.
Valid values:"basic" "apiKey" "oauth2"
Property value is required.- Returns:
- This object.
-
get
Description copied from class:SwaggerElement
Generic property getter.Can be used to retrieve non-standard Swagger fields such as
"$ref" .- Overrides:
get
in classSwaggerElement
- Type Parameters:
T
- The datatype to cast the value to.- Parameters:
property
- The property name to retrieve.type
- The datatype to cast the value to.- Returns:
- The property value, or
null if the property does not exist or is not set.
-
set
Description copied from class:SwaggerElement
Generic property setter.Can be used to set non-standard Swagger fields such as
"$ref" .- Overrides:
set
in classSwaggerElement
- Parameters:
property
- The property name to set.value
- The new value for the property.- Returns:
- This object.
-
keySet
Description copied from class:SwaggerElement
Returns all the keys on this element.- Overrides:
keySet
in classSwaggerElement
- Returns:
- All the keys on this element.
Nevernull .
-