Class: Modern::Descriptor::Security::ApiKey
- Defined in:
- lib/modern/descriptor/security.rb
Instance Method Summary collapse
- #do_credential_fetch(request) ⇒ Object
-
#initialize(fields) ⇒ ApiKey
constructor
A new instance of ApiKey.
- #to_openapi3 ⇒ Object
Methods inherited from Base
Methods included from Struct::Copy
Constructor Details
#initialize(fields) ⇒ ApiKey
Returns a new instance of ApiKey.
57 58 59 60 61 62 63 |
# File 'lib/modern/descriptor/security.rb', line 57 def initialize(fields) super # I didn't want to rewrite all my parameter logic. raise Modern::Errors::SetupError, "Parameter must not be 'required' (internal limitation)." \ if parameter.required end |
Instance Method Details
#do_credential_fetch(request) ⇒ Object
65 66 67 |
# File 'lib/modern/descriptor/security.rb', line 65 def do_credential_fetch(request) parameter.do_retrieve(request) end |
#to_openapi3 ⇒ Object
69 70 71 |
# File 'lib/modern/descriptor/security.rb', line 69 def to_openapi3 parameter.to_openapi3(true).merge(type: "apiKey") end |