slack-verify: Slack API Request Verification HMAC

[ library, mit, web ] [ Propose Tags ] [ Report a vulnerability ]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0
Change log CHANGELOG.md
Dependencies base (>=4.7 && <5), base16-bytestring (>=0.1), bytestring (>=0.10), cryptonite (>=0.25) [details]
License MIT
Copyright 2018 Kyung Mo Kweon
Author Kyung Mo Kweon
Maintainer kkweon@gmaill.com
Category Web
Home page https://github.com/kkweon/slack-verify-haskell#readme
Bug tracker https://github.com/kkweon/slack-verify-haskell/issues
Source repo head: git clone https://github.com/kkweon/slack-verify-haskell
Uploaded by kkweon at 2018-12-22T00:17:25Z
Distributions
Downloads 618 total (7 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-12-22 [all 1 reports]

Readme for slack-verify-0.1.0.0

[back to package description]

slack-verify

Build Status Coverage Status Hacckage Version

Get Started

import qualified Web.Slack.Auth as Auth

slackSecret = Auth.SlackSigningToken "8f742231b10e8888abcd99yyyzzz85a5"
timestamp = Auth.Timestamp 1531420618
body = "token=xyzz0WbapA4vBCDEFasx0q6G&team_id=T1DC2JH3J&team_domain=testteamnow&channel_id=G8PSS9T3V&channel_name=foobar&user_id=U2CERLKJA&user_name=roadrunner&command=%2Fwebhook-collect&text=&response_url=https%3A%2F%2Fhooks.slack.com%2Fcommands%2FT1DC2JH3J%2F397700885554%2F96rGlfmibIGlgcZRskXaIFfN&trigger_id=398738663015.47445629121.803a0bc887a14d10d2c447fce8b6703c"
expectedHash = Auth.Hex "v0=a2114d57b48eac39b9ad189dd8316235a7b4a8d21a10bd27519666489c69b503"

Auth.verify slackSecret timestamp body expectedHash