Module: Jsapi::Meta::OpenAPI::SecurityScheme::HTTP
- Defined in:
- lib/jsapi/meta/openapi/security_scheme/http.rb,
lib/jsapi/meta/openapi/security_scheme/http/basic.rb,
lib/jsapi/meta/openapi/security_scheme/http/other.rb,
lib/jsapi/meta/openapi/security_scheme/http/bearer.rb
Defined Under Namespace
Class Method Summary collapse
-
.new(keywords = {}) ⇒ Object
Creates a new HTTP authentication scheme.
Class Method Details
.new(keywords = {}) ⇒ Object
Creates a new HTTP authentication scheme.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/jsapi/meta/openapi/security_scheme/http.rb', line 14 def new(keywords = {}) scheme = keywords[:scheme] || 'basic' case scheme.to_s when 'basic' HTTP::Basic.new(keywords.except(:scheme)) when 'bearer' HTTP::Bearer.new(keywords.except(:scheme)) else HTTP::Other.new(keywords) end end |