Class: A2A::SecurityScheme::HTTPAuth
- Inherits:
-
Object
- Object
- A2A::SecurityScheme::HTTPAuth
- Defined in:
- lib/a2a/security_scheme/http_auth.rb
Instance Attribute Summary collapse
-
#bearer_format ⇒ Object
readonly
Returns the value of attribute bearer_format.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#scheme ⇒ Object
readonly
Returns the value of attribute scheme.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(scheme:, bearer_format: nil, description: nil) ⇒ HTTPAuth
constructor
A new instance of HTTPAuth.
- #to_h ⇒ Object
Constructor Details
#initialize(scheme:, bearer_format: nil, description: nil) ⇒ HTTPAuth
Returns a new instance of HTTPAuth.
8 9 10 11 12 |
# File 'lib/a2a/security_scheme/http_auth.rb', line 8 def initialize(scheme:, bearer_format: nil, description: nil) @scheme = scheme @bearer_format = bearer_format @description = description end |
Instance Attribute Details
#bearer_format ⇒ Object (readonly)
Returns the value of attribute bearer_format.
6 7 8 |
# File 'lib/a2a/security_scheme/http_auth.rb', line 6 def bearer_format @bearer_format end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/a2a/security_scheme/http_auth.rb', line 6 def description @description end |
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
6 7 8 |
# File 'lib/a2a/security_scheme/http_auth.rb', line 6 def scheme @scheme end |
Class Method Details
.from_h(hash) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/a2a/security_scheme/http_auth.rb', line 14 def self.from_h(hash) new( scheme: hash.fetch("scheme"), bearer_format: hash["bearerFormat"], description: hash["description"] ) end |
Instance Method Details
#to_h ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/a2a/security_scheme/http_auth.rb', line 22 def to_h { "httpAuthSecurityScheme" => { "scheme" => scheme, "bearerFormat" => bearer_format, "description" => description }.compact } end |