Last active
March 20, 2019 05:35
-
-
Save abhirockzz/c1aa35fb3d8e70fa77bae5c1dffc7c53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
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