Class SecurityScheme
The Security Scheme Object defines a security scheme that can be used by the operations in Swagger 2.0. 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).
Swagger Specification:
The Security Scheme Object is composed of the following fields:
- type (string, REQUIRED) - The type of the security scheme. Values:- "basic" ,- "apiKey" ,- "oauth2" 
- description (string) - A short description for security scheme
- name (string) - The name of the header or query parameter to be used (for- "apiKey" type)
- in (string) - The location of the API key (for- "apiKey" type). Values:- "query" ,- "header" 
- flow (string) - The flow used by the OAuth2 security scheme (for- "oauth2" type). Values:- "implicit" ,- "password" ,- "application" ,- "accessCode" 
- authorizationUrl (string) - The authorization URL to be used for this flow (for- "oauth2" type)
- tokenUrl (string) - The token URL to be used for this flow (for- "oauth2" type)
- scopes (map of string) - The available scopes for the OAuth2 security scheme (for- "oauth2" type)
Example:
   
See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor.SecurityScheme(SecurityScheme copyFrom) Copy constructor.
- 
Method SummaryModifier and TypeMethodDescriptionBean property appender:scopes .copy()Make a deep copy of this object.<T> TGeneric 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 .strict()Sets strict mode on this bean.Sets strict mode on this bean.
- 
Constructor Details- 
SecuritySchemepublic SecurityScheme()Default constructor.
- 
SecuritySchemeCopy constructor.- Parameters:
- copyFrom- The object to copy.
 
 
- 
- 
Method Details- 
copyMake a deep copy of this object.- Returns:
- A deep copy of this object.
 
- 
strictDescription copied from class:SwaggerElementSets strict mode on this bean.- Overrides:
- strictin class- SwaggerElement
- Returns:
- This object.
 
- 
strictSets strict mode on this bean.- Overrides:
- strictin class- SwaggerElement
- Parameters:
- value- The new value for this property.
 Non-boolean values will be converted to boolean using- Boolean..- valueOf (value.toString())
 Can be- null (interpreted as- false ).
- Returns:
- This object.
 
- 
getAuthorizationUrlBean property getter:authorizationUrl .The authorization URL to be used for this flow. - Returns:
- The property value, or null if it is not set.
 
- 
setAuthorizationUrlBean 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 be- null to unset the property.
- Returns:
- This object.
 
- 
getDescriptionBean property getter:description .A short description for security scheme. - Returns:
- The property value, or null if it is not set.
 
- 
setDescriptionBean property setter:description .A short description for security scheme. - Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object.
 
- 
getFlowBean property getter:flow .The flow used by the OAuth2 security scheme. - Returns:
- The property value, or null if it is not set.
 
- 
setFlowBean 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 be- null to unset the property.
- Returns:
- This object.
 
- 
getInBean property getter:in .The location of the API key. - Returns:
- The property value, or null if it is not set.
 
- 
setInBean property setter:in .The location of the API key. - Parameters:
- value- The new value for this property.
 Valid values:- "query" 
- "header" 
 
 Can be- null to unset the property.
- Returns:
- This object.
 
- 
getNameBean 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.
 
- 
setNameBean property setter:name .The name of the header or query parameter to be used. - Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object.
 
- 
getScopesBean property getter:scopes .The available scopes for the OAuth2 security scheme. - Returns:
- The property value, or null if it is not set.
 
- 
setScopesBean property setter:scopes .The available scopes for the OAuth2 security scheme. - Parameters:
- value- The new value for this property.
 Can be- null to unset the property.
- Returns:
- This object.
 
- 
addScopeBean property appender:scopes .The available scopes for the OAuth2 security scheme. - Parameters:
- key- The scope key. Must not be- null .
- value- The scope value. Must not be- null .
- Returns:
- This object.
 
- 
getTokenUrlBean property getter:tokenUrl .The token URL to be used for this flow. - Returns:
- The property value, or null if it is not set.
 
- 
setTokenUrlBean 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 be- null to unset the property.
- Returns:
- This object.
 
- 
getTypeBean property getter:type .The type of the security scheme. - Returns:
- The property value, or null if it is not set.
 
- 
setTypeBean 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.
 Can be- null to unset the property.
- Returns:
- This object.
 
- 
getDescription copied from class:SwaggerElementGeneric property getter.Can be used to retrieve non-standard Swagger fields such as "$ref" .- Overrides:
- getin class- SwaggerElement
- 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.
 
- 
setDescription copied from class:SwaggerElementGeneric property setter.Can be used to set non-standard Swagger fields such as "$ref" .- Overrides:
- setin class- SwaggerElement
- Parameters:
- property- The property name to set. Must not be- null .
- value- The new value for the property.
- Returns:
- This object.
 
- 
keySetDescription copied from class:SwaggerElementReturns all the keys on this element.- Overrides:
- keySetin class- SwaggerElement
- Returns:
- All the keys on this element.
   
 Nevernull .
 
 
-