Module: Auth0::Api::V2::Anomaly

Included in:
Auth0::Api::V2
Defined in:
lib/auth0/api/v2/anomaly.rb

Overview

Methods to use the anomaly endpoints

Instance Method Summary collapse

Instance Method Details

#check_if_ip_is_blocked(ip) ⇒ Object

Use this route to determine if a given IP is currently blocked by the failed login to multiple user accounts trigger.

Parameters:

  • ip (string)

    The IP to check.

Raises:

See Also:



10
11
12
13
14
15
# File 'lib/auth0/api/v2/anomaly.rb', line 10

def check_if_ip_is_blocked(ip)
  raise Auth0::InvalidParameter, 'Must specify an IP' if ip.to_s.empty?

  path = "#{anomaly_path}/#{ip}"
  get(path)
end

#remove_ip_block(ip) ⇒ Object

Resets an IP that is currently blocked by the failed login to multiple user accounts trigger.

Parameters:

  • ip (string)

    The IP to remove block.

Raises:

See Also:



20
21
22
23
24
25
# File 'lib/auth0/api/v2/anomaly.rb', line 20

def remove_ip_block(ip)
  raise Auth0::InvalidParameter, 'Must specify an IP' if ip.to_s.empty?

  path = "#{anomaly_path}/#{ip}"
  delete(path)
end