Class: A2A::Types::HttpSecurityScheme
- Inherits:
-
SecurityScheme
- Object
- BaseModel
- SecurityScheme
- A2A::Types::HttpSecurityScheme
- Defined in:
- lib/a2a/types/security.rb
Overview
HTTP security scheme (Basic, Bearer, etc.)
Instance Attribute Summary collapse
-
#bearer_format ⇒ Object
readonly
Returns the value of attribute bearer_format.
-
#scheme ⇒ Object
readonly
Returns the value of attribute scheme.
Attributes inherited from SecurityScheme
Instance Method Summary collapse
-
#initialize(scheme:, bearer_format: nil) ⇒ HttpSecurityScheme
constructor
Initialize a new HTTP security scheme.
- #validate! ⇒ Object private
Methods inherited from SecurityScheme
Methods inherited from BaseModel
#==, #camelize, from_h, from_json, #hash, #to_h, #to_json, underscore, #valid?, #validate_array_type, #validate_inclusion, #validate_required, #validate_type
Constructor Details
#initialize(scheme:, bearer_format: nil) ⇒ HttpSecurityScheme
Initialize a new HTTP security scheme
91 92 93 94 95 |
# File 'lib/a2a/types/security.rb', line 91 def initialize(scheme:, bearer_format: nil) @scheme = scheme @bearer_format = bearer_format super(type: SECURITY_TYPE_HTTP) end |
Instance Attribute Details
#bearer_format ⇒ Object (readonly)
Returns the value of attribute bearer_format.
84 85 86 |
# File 'lib/a2a/types/security.rb', line 84 def bearer_format @bearer_format end |
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
84 85 86 |
# File 'lib/a2a/types/security.rb', line 84 def scheme @scheme end |
Instance Method Details
#validate! ⇒ Object (private)
99 100 101 102 103 |
# File 'lib/a2a/types/security.rb', line 99 def validate! super validate_required(:scheme) validate_inclusion(:scheme, %w[basic bearer digest]) end |