class MobiApi::MobiApiAuth

Constants

AUTHORIZATION

Public Class Methods

new(app=nil, tokenizer) click to toggle source
Calls superclass method
# File lib/mobi_api.rb, line 34
def initialize(app=nil, tokenizer)
  @token = tokenizer
  super(app)
end

Public Instance Methods

call(env) click to toggle source
# File lib/mobi_api.rb, line 39
def call(env)
  env[:request_headers][AUTHORIZATION] = @token[:auth_token] if @token.has_key?(:auth_token)
  @app.call(env)
end