Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithToken ¶
WithToken checks if token from request suits the given token.
Example ¶
package main import ( "github.com/openprovider/handlers/bearer" "github.com/takama/router" ) func main() { r := router.New() token := "s-fdF8-mF_9.B-4.1Cfd" h := func(ctx *router.Control) {} r.GET("/test", bearer.WithToken(token, h)) r.Listen(":3000") }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.