Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active March 20, 2019 05:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/c1aa35fb3d8e70fa77bae5c1dffc7c53 to your computer and use it in GitHub Desktop.
Save abhirockzz/c1aa35fb3d8e70fa77bae5c1dffc7c53 to your computer and use it in GitHub Desktop.
...
signingSecret, present := fdkCtx.Config()["SLACK_SIGNING_SECRET"]
if !present {
fmt.Println("please set SLACK_SIGNING_SECRET configuration in your app")
return
}
slackTimestamp := fdkCtx.Header().Get("X-Slack-Request-Timestamp")
b, err := ioutil.ReadAll(in)
if err != nil {
fmt.Println("unable to read slack data in message body", err)
}
slackSigningBaseString := "v0:" + slackTimestamp + ":" + string(b)
slackSignature := fdkCtx.Header().Get("X-Slack-Signature")
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment