Sha256: 161b5faa94a241b4283f6cbd3003b56f12cf1c8b63ce6df5f636ee1df6d6c0d5
Contents?: true
Size: 501 Bytes
Versions: 7
Compression:
Stored size: 501 Bytes
Contents
module Apiture module Middleware module Auth class Basic AUTHORIZATION_HEADER = 'Authorization'.freeze def initialize(app, options) @app = app @id = options[:id] end def call(env) auth_options = env[:context].options[@id] env[:basic_auth] = { username: auth_options[:username], password: auth_options[:password] } @app.call(env) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems