class MAuth::Faraday::ResponseAuthenticator
faraday middleware to authenticate incoming responses
Public Instance Methods
call(request_env)
click to toggle source
# File lib/mauth/faraday.rb, line 19 def call(request_env) @app.call(request_env).on_complete do |response_env| mauth_response = MAuth::Faraday::Response.new(response_env) mauth_client.authenticate!(mauth_response) # raises MAuth::InauthenticError when inauthentic response_env['mauth.app_uuid'] = mauth_response.signature_app_uuid response_env['mauth.authentic'] = true response_env end end