Class: MAuth::Faraday::Response
- Includes:
- Signed
- Defined in:
- lib/mauth/faraday.rb
Overview
representation of a Response (incoming) composed from a Faraday response env which can be passed to a Mauth::Client for authentication
Constant Summary
Constants inherited from Response
Response::SIGNATURE_COMPONENTS, Response::SIGNATURE_COMPONENTS_V2
Instance Attribute Summary collapse
-
#response_env ⇒ Object
readonly
Returns the value of attribute response_env.
Instance Method Summary collapse
- #attributes_for_signing ⇒ Object
-
#initialize(response_env) ⇒ Response
constructor
A new instance of Response.
- #mcc_authentication ⇒ Object
- #mcc_time ⇒ Object
- #x_mws_authentication ⇒ Object
- #x_mws_time ⇒ Object
Methods included from Signed
#fall_back_to_mws_signature_info, #protocol_version, #signature, #signature_app_uuid, #signature_info, #signature_token
Methods included from Signable
#normalize_path, #string_to_sign_v1, #string_to_sign_v2, #unescape_encode_query_string, #uri_escape
Constructor Details
#initialize(response_env) ⇒ Response
Returns a new instance of Response.
66 67 68 |
# File 'lib/mauth/faraday.rb', line 66 def initialize(response_env) @response_env = response_env end |
Instance Attribute Details
#response_env ⇒ Object (readonly)
Returns the value of attribute response_env.
64 65 66 |
# File 'lib/mauth/faraday.rb', line 64 def response_env @response_env end |
Instance Method Details
#attributes_for_signing ⇒ Object
70 71 72 |
# File 'lib/mauth/faraday.rb', line 70 def attributes_for_signing @attributes_for_signing ||= { status_code: response_env[:status], body: response_env[:body] } end |
#mcc_authentication ⇒ Object
86 87 88 |
# File 'lib/mauth/faraday.rb', line 86 def mcc_authentication @response_env[:response_headers]['mcc-authentication'] end |
#mcc_time ⇒ Object
82 83 84 |
# File 'lib/mauth/faraday.rb', line 82 def mcc_time @response_env[:response_headers]['mcc-time'] end |
#x_mws_authentication ⇒ Object
78 79 80 |
# File 'lib/mauth/faraday.rb', line 78 def x_mws_authentication @response_env[:response_headers]['x-mws-authentication'] end |
#x_mws_time ⇒ Object
74 75 76 |
# File 'lib/mauth/faraday.rb', line 74 def x_mws_time @response_env[:response_headers]['x-mws-time'] end |