WebHook broker that accepts notifications from multiple platforms and performs simple actions in response
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

common.py 374B

1234567891011121314
  1. import hashlib
  2. import os
  3. BASE_URL = os.environ["LAS_BASE_URL"]
  4. SECRET = os.environ["LAS_SECRET"]
  5. def get_hook_key(service, identifier):
  6. nonce = (service + SECRET + identifier).encode("ascii")
  7. return hashlib.sha256(nonce).hexdigest()
  8. def get_hook_url(service, identifier):
  9. return f"{BASE_URL}hooks/{service}/{identifier}/{get_hook_key(service, identifier)}"