Sha256: 4b380a7d45d8d1eb1029d5e46cf4d207e308168783319fc09e4783dbee3f3380

Contents?: true

Size: 442 Bytes

Versions: 93

Compression:

Stored size: 442 Bytes

Contents

require 'honeybadger/plugin'
require 'honeybadger/ruby'

module Honeybadger
  Plugin.register do
    requirement { defined?(::Warden::Manager.after_set_user) }

    execution do
      ::Warden::Manager.after_set_user do |user, auth, opts|
        if user.respond_to?(:id)
          ::Honeybadger.context({
            :user_scope => opts[:scope].to_s,
            :user_id => user.id.to_s
          })
        end
      end
    end
  end
end

Version data entries

93 entries across 93 versions & 1 rubygems

Version Path
honeybadger-4.5.5 lib/honeybadger/plugins/warden.rb
honeybadger-4.5.4 lib/honeybadger/plugins/warden.rb
honeybadger-4.5.3 lib/honeybadger/plugins/warden.rb
honeybadger-4.5.2 lib/honeybadger/plugins/warden.rb
honeybadger-4.5.1 lib/honeybadger/plugins/warden.rb
honeybadger-4.5.0 lib/honeybadger/plugins/warden.rb
honeybadger-4.4.2 lib/honeybadger/plugins/warden.rb
honeybadger-4.4.1 lib/honeybadger/plugins/warden.rb
honeybadger-4.4.0 lib/honeybadger/plugins/warden.rb
honeybadger-4.3.1 lib/honeybadger/plugins/warden.rb
honeybadger-4.3.0 lib/honeybadger/plugins/warden.rb
honeybadger-4.2.2 lib/honeybadger/plugins/warden.rb
honeybadger-4.2.1 lib/honeybadger/plugins/warden.rb
honeybadger-4.2.0 lib/honeybadger/plugins/warden.rb
honeybadger-4.1.0 lib/honeybadger/plugins/warden.rb
honeybadger-4.0.0 lib/honeybadger/plugins/warden.rb
honeybadger-3.3.1 lib/honeybadger/plugins/warden.rb
honeybadger-3.4.0.beta1 lib/honeybadger/plugins/warden.rb
honeybadger-3.3.0 lib/honeybadger/plugins/warden.rb
honeybadger-3.2.0 lib/honeybadger/plugins/warden.rb