{"id":15714372,"url":"https://github.com/mimiquate/slack_request","last_synced_at":"2025-12-26T11:57:14.159Z","repository":{"id":240286287,"uuid":"801748104","full_name":"mimiquate/slack_request","owner":"mimiquate","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-20T18:28:06.000Z","size":39,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-22T18:34:24.012Z","etag":null,"topics":["signature-verification","slack","slack-webhook","webhook"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/slack_request","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mimiquate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-16T20:48:16.000Z","updated_at":"2024-06-03T20:17:34.386Z","dependencies_parsed_at":"2024-06-03T20:27:36.110Z","dependency_job_id":null,"html_url":"https://github.com/mimiquate/slack_request","commit_stats":null,"previous_names":["mimiquate/slack_request"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimiquate%2Fslack_request","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimiquate%2Fslack_request/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimiquate%2Fslack_request/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimiquate%2Fslack_request/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mimiquate","download_url":"https://codeload.github.com/mimiquate/slack_request/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243233566,"owners_count":20258299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["signature-verification","slack","slack-webhook","webhook"],"created_at":"2024-10-03T21:36:30.253Z","updated_at":"2025-12-26T11:57:14.126Z","avatar_url":"https://github.com/mimiquate.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔐 SlackRequest\n\nUtilities for verifing an HTTP request can be authenticated as a request\ncoming from Slack HQ.\n\nhttps://api.slack.com/authentication/verifying-requests-from-slack\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `slack_request` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:slack_request, \"~\u003e 1.0.0\"}\n  ]\nend\n```\n\n## Usage\n\n### Plug\n\nSet `body_reader:` in `Plug.Parsers` inside your `Endpoint`.\n\n```elixir\n# lib/your_app_web/endpoint.ex\n\ndefmodule YourAppWeb.Endpoint do\n  ...\n\n  plug Plug.Parsers,\n    ...\n    body_reader: {SlackRequest.BodyReader, :read_and_cache_body, []}\nend\n```\n\nPlug the `SlackRequest.Plug` in the pipeline that handles your Slack Requests/Webhooks.\n\nExample:\n\n```elixir\n# lib/your_app_web/router.ex\n\ndefmodule YourAppWeb.Router do\n\n  ...\n\n  pipeline :slack do\n    plug :accepts, [\"json\"]\n    plug SlackRequest.Plug\n  end\n\n  scope \"/slack\", YourAppWeb do\n    pipe_through :slack\n\n    ...\n  end\n```\n\n### Manual\n\nOr if just prefer to use the validation function directly:\n\n```elixir\n# Somewhere were you're ready to validate the incoming request conn\n\nif SlackRequest.valid_request?(conn, secret: signing_secret, body: raw_request_body) do\n  # all good\nelse\n  # handle invalid slack request/webhook\nend\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at \u003chttps://hexdocs.pm/slack_request\u003e.\n\n## License\n\nCopyright 2024 Mimiquate\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimiquate%2Fslack_request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmimiquate%2Fslack_request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimiquate%2Fslack_request/lists"}