Qore Swagger Module Reference  2.0.9
Swagger::SecuritySchemeObject Class Reference

Allows the definition of a security scheme that can be used by the operations. More...

Inheritance diagram for Swagger::SecuritySchemeObject:

Public Member Methods

 constructor (hash< auto > oh)
 Constructor. More...
 
- Public Member Methods inherited from Swagger::ObjectBase
 constructor ()
 Constructor.
 
 constructor (hash< auto > oh)
 Constructor. More...
 
 constructor (ObjectBase other)
 copy constructor
 
 initialize (hash< auto > oh)
 Initialize. More...
 

Public Attributes

*string authorizationUrl
 The authorization URL to be used for this flow. This SHOULD be in the form of a URL. More...
 
*string desc
 A short description for security scheme.
 
*string flow
 The flow used by the OAuth2 security scheme. More...
 
*string inLoc
 The location of the API key. Valid values are "query" or "header". More...
 
*string name
 The name of the header or query parameter to be used. More...
 
*ScopesObject scopes
 The available scopes for the OAuth2 security scheme. More...
 
*string tokenUrl
 The token URL to be used for this flow. This SHOULD be in the form of a URL. More...
 
string type
 Required. The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2".
 
- Public Attributes inherited from Swagger::ObjectBase
hash< auto > vendorExtensions
 Allows extensions to the Swagger Schema. More...
 

Detailed Description

Allows the definition of a security scheme that can be used by the operations.

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).

Member Function Documentation

◆ constructor()

Swagger::SecuritySchemeObject::constructor ( hash< auto >  oh)

Constructor.

Parameters
ohdeserialized hash from the source schema description describing a security schema that can be used by REST API operations
Exceptions
INVALID-FIELD-TYPEfield has invalid type
INVALID-FLOWinvalid OAuth2 flow value
INVALID-APIKEY-LOCATIONinvalid 'in' (location) value
INVALID-SCHEME-TYPEinvalid security scheme type; see type
REQUIRED-FIELD-MISSINGrequired field is missing

Member Data Documentation

◆ authorizationUrl

*string Swagger::SecuritySchemeObject::authorizationUrl

The authorization URL to be used for this flow. This SHOULD be in the form of a URL.

Required when type is "oauth2" and flow is "implicit" or "accessCode".

◆ flow

*string Swagger::SecuritySchemeObject::flow

The flow used by the OAuth2 security scheme.

Required when type is "oauth2".

Valid values are "implicit", "password", "application" or "accessCode".

◆ inLoc

*string Swagger::SecuritySchemeObject::inLoc

The location of the API key. Valid values are "query" or "header".

Required when type is "apiKey".

◆ name

*string Swagger::SecuritySchemeObject::name

The name of the header or query parameter to be used.

Required when type is "apiKey".

◆ scopes

*ScopesObject Swagger::SecuritySchemeObject::scopes

The available scopes for the OAuth2 security scheme.

Required when type is "oauth2".

A hash in the form of Scopes Object mapping scope names to short descriptions of them. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#scopesObject Keys are scope names. Values are short string descriptions.

◆ tokenUrl

*string Swagger::SecuritySchemeObject::tokenUrl

The token URL to be used for this flow. This SHOULD be in the form of a URL.

Required when type is "oauth2" and flow is one of "password", "application" or "accessCode".