Class: Azure::Core::Auth::SharedKeyLite
- Defined in:
- lib/azure/core/auth/shared_key_lite.rb
Instance Attribute Summary
Attributes inherited from SharedKey
Attributes inherited from Signer
Instance Method Summary collapse
-
#name ⇒ String
The name of the strategy.
-
#signable_string(method, uri, headers) ⇒ Object
Generate the string to sign.
Methods inherited from SharedKey
#canonicalized_headers, #canonicalized_resource, #initialize, #sign, #sign_request
Methods inherited from Signer
Constructor Details
This class inherits a constructor from Azure::Core::Auth::SharedKey
Instance Method Details
#name ⇒ String
The name of the strategy.
24 25 26 |
# File 'lib/azure/core/auth/shared_key_lite.rb', line 24 def name 'SharedKeyLite' end |
#signable_string(method, uri, headers) ⇒ Object
Generate the string to sign.
Returns a plain text string.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/azure/core/auth/shared_key_lite.rb', line 35 def signable_string(method, uri, headers) [ method.to_s.upcase, headers.fetch('Content-MD5', ''), headers.fetch('Content-Type', ''), headers.fetch('Date') { raise IndexError, 'Headers must include Date' }, canonicalized_headers(headers), canonicalized_resource(uri) ].join("\n") end |