Module: Webhooks::Outgoing::EndpointSupport
- Extended by:
- ActiveSupport::Concern
- Includes:
- UriFiltering
- Included in:
- Endpoint
- Defined in:
- app/models/concerns/webhooks/outgoing/endpoint_support.rb
Instance Method Summary
collapse
#_allowed_uri?, #allowed_uri?, #resolve_ip_from_authoritative
Instance Method Details
#creative_concepts ⇒ Object
34
35
36
|
# File 'app/models/concerns/webhooks/outgoing/endpoint_support.rb', line 34
def creative_concepts
team.scaffolding_absolutely_abstract_creative_concepts
end
|
#event_types ⇒ Object
38
39
40
|
# File 'app/models/concerns/webhooks/outgoing/endpoint_support.rb', line 38
def event_types
Webhooks::Outgoing::EventType.where(id: event_type_ids)
end
|
#generate_webhook_secret ⇒ Object
46
47
48
|
# File 'app/models/concerns/webhooks/outgoing/endpoint_support.rb', line 46
def generate_webhook_secret
self.webhook_secret ||= SecureRandom.hex(32)
end
|
#rotate_webhook_secret! ⇒ Object
50
51
52
|
# File 'app/models/concerns/webhooks/outgoing/endpoint_support.rb', line 50
def rotate_webhook_secret!
update!(webhook_secret: SecureRandom.hex(32))
end
|
#valid_event_types ⇒ Object
30
31
32
|
# File 'app/models/concerns/webhooks/outgoing/endpoint_support.rb', line 30
def valid_event_types
Webhooks::Outgoing::EventType.all
end
|