Class: OmniEvent::Notifier
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- OmniEvent::Notifier
- Defined in:
- app/models/omni_event/notifier.rb
Instance Method Summary collapse
-
#allows_ip?(ip) ⇒ Boolean
Returns true if the given IP is allowed to send requests.
-
#signature_verification? ⇒ Boolean
Returns true if HMAC signature verification is active for this notifier.
Instance Method Details
#allows_ip?(ip) ⇒ Boolean
Returns true if the given IP is allowed to send requests. Skipped when check_ip is false.
17 18 19 20 21 |
# File 'app/models/omni_event/notifier.rb', line 17 def allows_ip?(ip) return true unless check_ip? Array(allowed_ips).include?(ip.to_s) end |
#signature_verification? ⇒ Boolean
Returns true if HMAC signature verification is active for this notifier.
24 25 26 |
# File 'app/models/omni_event/notifier.rb', line 24 def signature_verification? secret_key.present? end |