Documentation ¶
Overview ¶
Package signing provides signing functionality for requests to/from Slack.
Index ¶
Constants ¶
View Source
const ( // SlackTimestampHeader is the HTTP header that Slack uses for specifying // the timestamp used in generating the signature. SlackTimestampHeader = "X-Slack-Request-Timestamp" // SlackSignatureHeader is the HTTP header that Slack uses for specifying // the signature that was generated. SlackSignatureHeader = "X-Slack-Signature" )
Variables ¶
This section is empty.
Functions ¶
func Sign ¶
Sign takes the signature key, and a request, and then signs the request using that key. Afterwards the request should be trusted by any application implementing this signature verification method.
Types ¶
type Request ¶
type Request struct { // Timestamp is the X-Slack-Request-Timestamp HTTP request header Timestamp string // Signature is the X-Slack-Signature HTTP request header, which is the provided // HMAC signature Signature string // Body is the request body Body []byte }
Request represents the pieces of a request needed to do a signature validation. We take this instead of an *http.Request so that we don't need to be responsible for rewinding its response body.
Click to show internal directories.
Click to hide internal directories.