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-5.26.2 lib/honeybadger/plugins/warden.rb
honeybadger-5.26.1 lib/honeybadger/plugins/warden.rb
honeybadger-5.26.0 lib/honeybadger/plugins/warden.rb
honeybadger-5.25.0 lib/honeybadger/plugins/warden.rb
honeybadger-5.24.0 lib/honeybadger/plugins/warden.rb
honeybadger-5.23.0 lib/honeybadger/plugins/warden.rb
honeybadger-5.22.0 lib/honeybadger/plugins/warden.rb
honeybadger-5.21.0 lib/honeybadger/plugins/warden.rb
honeybadger-5.20.1 lib/honeybadger/plugins/warden.rb
honeybadger-5.20.0 lib/honeybadger/plugins/warden.rb
honeybadger-5.19.2 lib/honeybadger/plugins/warden.rb
honeybadger-5.19.1 lib/honeybadger/plugins/warden.rb
honeybadger-5.19.0 lib/honeybadger/plugins/warden.rb
honeybadger-5.18.0 lib/honeybadger/plugins/warden.rb
honeybadger-5.17.0 lib/honeybadger/plugins/warden.rb
honeybadger-5.16.0 lib/honeybadger/plugins/warden.rb
honeybadger-5.15.6 lib/honeybadger/plugins/warden.rb
honeybadger-5.15.5 lib/honeybadger/plugins/warden.rb
honeybadger-5.15.4 lib/honeybadger/plugins/warden.rb
honeybadger-5.15.3 lib/honeybadger/plugins/warden.rb