@Bean(properties="type,description,name,in,flow,authorizationUrl,tokenUrl,scopes,*") public class SecurityScheme extends SwaggerElement
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).
Constructor and Description |
---|
SecurityScheme() |
Modifier and Type | Method and Description |
---|---|
SecurityScheme |
addScopes(Map<String,String> values)
Adds one or more values to the
|
SecurityScheme |
authorizationUrl(Object value)
Same as
setAuthorizationUrl(String) . |
SecurityScheme |
description(Object value)
Same as
setDescription(String) . |
SecurityScheme |
flow(Object value)
Same as
setFlow(String) . |
<T> T |
get(String property,
Class<T> type)
Generic property getter.
|
String |
getAuthorizationUrl()
Bean property getter:
|
String |
getDescription()
Bean property getter:
|
String |
getFlow()
Bean property getter:
|
String |
getIn()
Bean property getter:
|
String |
getName()
Bean property getter:
|
Map<String,String> |
getScopes()
Bean property getter:
|
String |
getTokenUrl()
Bean property getter:
|
String |
getType()
Bean property getter:
|
SecurityScheme |
in(Object value)
Same as
setIn(String) . |
SecurityScheme |
name(Object value)
Same as
setName(String) . |
SecurityScheme |
scopes(Object... values)
Adds one or more values to the
|
SecurityScheme |
set(String property,
Object value)
Generic property setter.
|
SecurityScheme |
setAuthorizationUrl(String value)
Bean property setter:
|
SecurityScheme |
setDescription(String value)
Bean property setter:
|
SecurityScheme |
setFlow(String value)
Bean property setter:
|
SecurityScheme |
setIn(String value)
Bean property setter:
|
SecurityScheme |
setName(String value)
Bean property setter:
|
SecurityScheme |
setScopes(Map<String,String> value)
Bean property setter:
|
SecurityScheme |
setTokenUrl(String value)
Bean property setter:
|
SecurityScheme |
setType(String value)
Bean property setter:
|
protected SecurityScheme |
strict()
Sets strict mode on this bean.
|
SecurityScheme |
tokenUrl(Object value)
Same as
setTokenUrl(String) . |
SecurityScheme |
type(Object value)
Same as
setType(String) . |
getExtraProperties, isStrict, strict, toString
public SecurityScheme()
protected SecurityScheme strict()
SwaggerElement
strict
in class SwaggerElement
public String getType()
The type of the security scheme.
public SecurityScheme setType(String value)
The type of the security scheme.
Valid values are .
value
- The new value for this property.
public SecurityScheme type(Object value)
setType(String)
.value
- The new value for this property.
toString()
.
public String getDescription()
A short description for security scheme.
public SecurityScheme setDescription(String value)
A short description for security scheme.
value
- The new value for this property.
public SecurityScheme description(Object value)
setDescription(String)
.value
- The new value for this property.
toString()
.
public String getName()
The name of the header or query parameter to be used.
public SecurityScheme setName(String value)
The name of the header or query parameter to be used.
value
- The new value for this property.
public SecurityScheme name(Object value)
setName(String)
.value
- The new value for this property.
toString()
.
public String getIn()
The location of the API key.
public SecurityScheme setIn(String value)
The location of the API key.
value
- The new value for this property.
public SecurityScheme in(Object value)
setIn(String)
.value
- The new value for this property.
toString()
.
public String getFlow()
The flow used by the OAuth2 security scheme.
public SecurityScheme setFlow(String value)
The flow used by the OAuth2 security scheme.
value
- The new value for this property.
public SecurityScheme flow(Object value)
setFlow(String)
.value
- The new value for this property.
toString()
.
public String getAuthorizationUrl()
The authorization URL to be used for this flow.
public SecurityScheme setAuthorizationUrl(String value)
The authorization URL to be used for this flow.
value
- The new value for this property.
public SecurityScheme authorizationUrl(Object value)
setAuthorizationUrl(String)
.value
- The new value for this property.
toString()
.
public String getTokenUrl()
The token URL to be used for this flow.
public SecurityScheme setTokenUrl(String value)
The token URL to be used for this flow.
value
- The new value for this property.
public SecurityScheme tokenUrl(Object value)
setTokenUrl(String)
.value
- The new value for this property.
toString()
.
public Map<String,String> getScopes()
The available scopes for the OAuth2 security scheme.
public SecurityScheme setScopes(Map<String,String> value)
The available scopes for the OAuth2 security scheme.
value
- The new value for this property.
public SecurityScheme addScopes(Map<String,String> values)
values
- The values to add to this property.
public SecurityScheme scopes(Object... values)
values
- The values to add to this property.
Map<String,HeaderInfo
|String>
String
- JSON object representation of Map<String,HeaderInfo
>
scopes(
public <T> T get(String property, Class<T> type)
SwaggerElement
Can be used to retrieve non-standard Swagger fields such as
get
in class SwaggerElement
property
- The property name to retrieve.type
- The datatype to cast the value to.public SecurityScheme set(String property, Object value)
SwaggerElement
Can be used to set non-standard Swagger fields such as
set
in class SwaggerElement
property
- The property name to set.value
- The new value for the property.Copyright © 2018 Apache. All rights reserved.