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
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.
- #x_mws_authentication ⇒ Object
- #x_mws_time ⇒ Object
Methods included from Signed
#signature, #signature_app_uuid, #signature_info, #signature_token
Methods included from Signable
Constructor Details
#initialize(response_env) ⇒ Response
Returns a new instance of Response.
56 57 58 |
# File 'lib/mauth/faraday.rb', line 56 def initialize(response_env) @response_env = response_env end |
Instance Attribute Details
#response_env ⇒ Object (readonly)
Returns the value of attribute response_env.
55 56 57 |
# File 'lib/mauth/faraday.rb', line 55 def response_env @response_env end |
Instance Method Details
#attributes_for_signing ⇒ Object
60 61 62 |
# File 'lib/mauth/faraday.rb', line 60 def attributes_for_signing @attributes_for_signing ||= { status_code: response_env[:status], body: response_env[:body] } end |
#x_mws_authentication ⇒ Object
68 69 70 |
# File 'lib/mauth/faraday.rb', line 68 def x_mws_authentication @response_env[:response_headers]['x-mws-authentication'] end |
#x_mws_time ⇒ Object
64 65 66 |
# File 'lib/mauth/faraday.rb', line 64 def x_mws_time @response_env[:response_headers]['x-mws-time'] end |