Class: MAuth::Rack::Request
- Inherits:
-
MAuth::Request
- Object
- MAuth::Request
- MAuth::Rack::Request
- Includes:
- Signed
- Defined in:
- lib/mauth/rack.rb
Overview
representation of a request composed from a rack request env which can be passed to a Mauth::Client for authentication
Constant Summary
Constants inherited from MAuth::Request
MAuth::Request::SIGNATURE_COMPONENTS
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
- #attributes_for_signing ⇒ Object
-
#initialize(env) ⇒ Request
constructor
A new instance of Request.
- #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(env) ⇒ Request
Returns a new instance of Request.
87 88 89 |
# File 'lib/mauth/rack.rb', line 87 def initialize(env) @env = env end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
86 87 88 |
# File 'lib/mauth/rack.rb', line 86 def env @env end |
Instance Method Details
#attributes_for_signing ⇒ Object
91 92 93 94 95 96 97 98 |
# File 'lib/mauth/rack.rb', line 91 def attributes_for_signing @attributes_for_signing ||= begin env['rack.input'].rewind body = env['rack.input'].read env['rack.input'].rewind { verb: env['REQUEST_METHOD'], request_url: env['PATH_INFO'], body: body } end end |
#x_mws_authentication ⇒ Object
104 105 106 |
# File 'lib/mauth/rack.rb', line 104 def x_mws_authentication @env['HTTP_X_MWS_AUTHENTICATION'] end |
#x_mws_time ⇒ Object
100 101 102 |
# File 'lib/mauth/rack.rb', line 100 def x_mws_time @env['HTTP_X_MWS_TIME'] end |