Class: GCMMiddleware::Authentication

Inherits:
Object
  • Object
show all
Defined in:
lib/gcm_middleware/authentication.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ Authentication

Returns a new instance of Authentication.



3
4
5
# File 'lib/gcm_middleware/authentication.rb', line 3

def initialize(app, options = {})
  @app, @options = app, options
end

Instance Method Details

#call(env) ⇒ Object



7
8
9
10
11
# File 'lib/gcm_middleware/authentication.rb', line 7

def call(env)
  env.request_headers['Authorization'] = auth_key

  app.call(env).on_complete { |env| }
end