class Sqreen::Actions::BlockUser
Blocks a user at the point Sqreen::identify()
or Sqreen::auth_track()
are called
Public Class Methods
new(id, opts, _params = {})
click to toggle source
Calls superclass method
Sqreen::Actions::Base::new
# File lib/sqreen/actions/block_user.rb, line 20 def initialize(id, opts, _params = {}) super(id, opts) end
Public Instance Methods
do_run(identity_params)
click to toggle source
# File lib/sqreen/actions/block_user.rb, line 24 def do_run(identity_params) Sqreen.log.debug( "Will raise due to user being blocked by action #{id}. " \ "Blocked user identity: #{identity_params}" ) e = Sqreen::AttackBlocked.new( "Blocked user with identity #{identity_params} " \ 'due to automatic security response. No action is required' ) { :status => :raise, :exception => e, } end
event_properties(identity_params)
click to toggle source
# File lib/sqreen/actions/block_user.rb, line 41 def event_properties(identity_params) { 'user' => identity_params } end