Class: Mixlib::Authentication::SigningObject
- Inherits:
-
Struct
- Object
- Struct
- Mixlib::Authentication::SigningObject
- Includes:
- SignedHeaderAuth
- Defined in:
- lib/mixlib/authentication/signedheaderauth.rb
Overview
SigningObject
A Struct-based value object that contains the necessary information to generate a request signature. ‘SignedHeaderAuth.signing_object()` provides a more convenient interface to the constructor.
Constant Summary
Constants included from SignedHeaderAuth
Mixlib::Authentication::SignedHeaderAuth::ALGORITHM_FOR_VERSION, Mixlib::Authentication::SignedHeaderAuth::DEFAULT_PROTO_VERSION, Mixlib::Authentication::SignedHeaderAuth::DEFAULT_SIGN_ALGORITHM, Mixlib::Authentication::SignedHeaderAuth::NULL_ARG, Mixlib::Authentication::SignedHeaderAuth::SUPPORTED_ALGORITHMS, Mixlib::Authentication::SignedHeaderAuth::SUPPORTED_VERSIONS
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#file ⇒ Object
Returns the value of attribute file.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#host ⇒ Object
Returns the value of attribute host.
-
#http_method ⇒ Object
Returns the value of attribute http_method.
-
#path ⇒ Object
Returns the value of attribute path.
-
#proto_version ⇒ Object
Returns the value of attribute proto_version.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Instance Method Summary collapse
Methods included from SignedHeaderAuth
#algorithm, #canonicalize_request, #do_sign, #do_sign_ssh_agent, #hashed_body, #sign, signing_object, #validate_sign_version_digest!
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body
343 344 345 |
# File 'lib/mixlib/authentication/signedheaderauth.rb', line 343 def body @body end |
#file ⇒ Object
Returns the value of attribute file
343 344 345 |
# File 'lib/mixlib/authentication/signedheaderauth.rb', line 343 def file @file end |
#headers ⇒ Object
Returns the value of attribute headers
343 344 345 |
# File 'lib/mixlib/authentication/signedheaderauth.rb', line 343 def headers @headers end |
#host ⇒ Object
Returns the value of attribute host
343 344 345 |
# File 'lib/mixlib/authentication/signedheaderauth.rb', line 343 def host @host end |
#http_method ⇒ Object
Returns the value of attribute http_method
343 344 345 |
# File 'lib/mixlib/authentication/signedheaderauth.rb', line 343 def http_method @http_method end |
#path ⇒ Object
Returns the value of attribute path
343 344 345 |
# File 'lib/mixlib/authentication/signedheaderauth.rb', line 343 def path @path end |
#proto_version ⇒ Object
Returns the value of attribute proto_version
343 344 345 |
# File 'lib/mixlib/authentication/signedheaderauth.rb', line 343 def proto_version @proto_version end |
#timestamp ⇒ Object
Returns the value of attribute timestamp
343 344 345 |
# File 'lib/mixlib/authentication/signedheaderauth.rb', line 343 def @timestamp end |
#user_id ⇒ Object
Returns the value of attribute user_id
343 344 345 |
# File 'lib/mixlib/authentication/signedheaderauth.rb', line 343 def user_id @user_id end |
Instance Method Details
#server_api_version ⇒ Object
353 354 355 356 357 358 359 360 361 362 |
# File 'lib/mixlib/authentication/signedheaderauth.rb', line 353 def server_api_version key = (self[:headers] || {}).keys.select do |k| k.casecmp("x-ops-server-api-version") == 0 end.first if key self[:headers][key] else DEFAULT_SERVER_API_VERSION end end |