Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

dperezmavro/slack-verifier-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This middleware can be used in in an HTTP handler in order to verify that a call to the application is originalting from slack (perhaps as part of a Slack-application's callback).

Usage

Top use the slack verifier, you need to have a key for all the crypto-operations, and initialise the middleware with that key.

You can use it directly, like this:

http.Handle("/path", middleware.VerifySlackMessage(slackKey)(http.HandlerFunc(healthCheckHandlerSimple)))

Or as part of a collection of other middleware, like this:

http.Handle("/path2",
    addMiddleware(
        healthCheckHandler(),
        middleware.VerifySlackMessage(slackKey),
    ),
)

main.go has some examples on how to use it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published