Sha256: 15225b9c9e84bd9760563f0aed07321a09552e132f4a6e5a0f8bf1849db1d5c3
Contents?: true
Size: 381 Bytes
Versions: 1
Compression:
Stored size: 381 Bytes
Contents
module GCMMiddleware class Authentication def initialize(app, options = {}) @app, @options = app, options end def call(env) env.request_headers['Authorization'] = auth_key app.call(env).on_complete { |env| } end private attr_reader :app, :options def auth_key @auth_key ||= "key=#{options[:key]}".freeze end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gcm_middleware-0.0.1 | lib/gcm_middleware/authentication.rb |