struct

Swagger::Authorization

Inherits Struct < Value < Object

Define a authentication

Avaibled authentication in Type

Constructors

new(name : String, description : String | Nil = nil, api_key_name : String | Nil = nil, bearer_format : String | Nil = nil, parameter_location : String | Nil = nil)
Source
new(name : Type, description : String | Nil = nil, api_key_name : String | Nil = nil, bearer_format : String | Nil = nil, parameter_location : String | Nil = nil, oauth2_flows : Array(OAuth2Flow) | Nil = nil)
Source

Class methods

api_key(*, name : String, location = "header", description : String | Nil = nil)

Access with api key auth.

Source
basic(description : String | Nil = nil)

Access with basic auth.

Source
bearer(*, format : String | Nil = nil, description : String | Nil = nil)

Access with bearer auth.

Source
jwt(description : String | Nil = nil)

Access with jwt auth.

Source
none(description : String | Nil = nil)

Access without any authorization.

Source
oauth2(*, grant_type name : String, authorization_url : String | Nil = nil, token_url : String | Nil = nil, refresh_url : String | Nil = nil, scopes : Hash(String, String) | Nil = nil, description : String | Nil = nil)
Source
oauth2(*, flows : Array(OAuth2Flow) | Nil = nil, description : String | Nil = nil)
Source

Instance methods

api_key_name
Source
api_key_name=(api_key_name : Nil | String)
Source
bearer_format
Source
bearer_format=(bearer_format : Nil | String)
Source
description
Source
description=(description : Nil | String)
Source
key

Transform name to unique key name

Swagger::Authorization.basic.key                        # => "basic_auth"
Swagger::Authorization.bearer.key                       # => "bearer_auth"
Swagger::Authorization.bearer(format: "custom").key     # => "custom_auth"
Swagger::Authorization.jwt.key.˙                        # => "jwt_auth"
Swagger::Authorization.api_key.key.˙                    # => "api_key_auth"
Swagger::Authorization.cookie(name: "JSESSIONID").key.˙ # => "cookie_auth"
Source
name

Transform type to String typed and downcase of value

Source
oauth2_flows
Source
oauth2_flows=(oauth2_flows : Nil | Array(Swagger::OAuth2Flow))
Source
parameter_location
Source
parameter_location=(parameter_location : Nil | String)
Source
type
Source

Nested types