Qore Swagger Module Reference 2.1.1
Loading...
Searching...
No Matches
SecuritySchemeObject Class Reference

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

#include <Swagger.qm.dox.h>

Inherits ObjectBase.

Public Member Methods

 constructor (hash< auto > oh)
 Constructor. 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".
 

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

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 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 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 SecuritySchemeObject::inLoc

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

Required when type is "apiKey".

◆ name

*string SecuritySchemeObject::name

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

Required when type is "apiKey".

◆ scopes

*ScopesObject 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 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".