Exception: Gitlab::Auth::TooManyIps

Inherits:
StandardError
  • Object
show all
Defined in:
lib/gitlab/auth/too_many_ips.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_id, ip, unique_ips_count) ⇒ TooManyIps

Returns a new instance of TooManyIps.


8
9
10
11
12
# File 'lib/gitlab/auth/too_many_ips.rb', line 8

def initialize(user_id, ip, unique_ips_count)
  @user_id = user_id
  @ip = ip
  @unique_ips_count = unique_ips_count
end

Instance Attribute Details

#ipObject (readonly)

Returns the value of attribute ip


6
7
8
# File 'lib/gitlab/auth/too_many_ips.rb', line 6

def ip
  @ip
end

#unique_ips_countObject (readonly)

Returns the value of attribute unique_ips_count


6
7
8
# File 'lib/gitlab/auth/too_many_ips.rb', line 6

def unique_ips_count
  @unique_ips_count
end

#user_idObject (readonly)

Returns the value of attribute user_id


6
7
8
# File 'lib/gitlab/auth/too_many_ips.rb', line 6

def user_id
  @user_id
end

Instance Method Details

#messageObject


14
15
16
# File 'lib/gitlab/auth/too_many_ips.rb', line 14

def message
  "User #{user_id} from IP: #{ip} tried logging from too many ips: #{unique_ips_count}"
end