class MAuth::Rack::Request

representation of a request composed from a rack request env which can be passed to a Mauth::Client for authentication

Attributes

env[R]

Public Class Methods

new(env) click to toggle source
# File lib/mauth/rack.rb, line 118
def initialize(env)
  @env = env
end

Public Instance Methods

attributes_for_signing() click to toggle source
# File lib/mauth/rack.rb, line 122
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,
      query_string: env['QUERY_STRING']
    }
  end
end
mcc_authentication() click to toggle source
# File lib/mauth/rack.rb, line 148
def mcc_authentication
  @env['HTTP_MCC_AUTHENTICATION']
end
mcc_time() click to toggle source
# File lib/mauth/rack.rb, line 144
def mcc_time
  @env['HTTP_MCC_TIME']
end
x_mws_authentication() click to toggle source
# File lib/mauth/rack.rb, line 140
def x_mws_authentication
  @env['HTTP_X_MWS_AUTHENTICATION']
end
x_mws_time() click to toggle source
# File lib/mauth/rack.rb, line 136
def x_mws_time
  @env['HTTP_X_MWS_TIME']
end