Created
August 4, 2018 19:08
-
-
Save cmnstmntmn/6825de46a7ab1d6ebddc9cb7a1559d68 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
package middlewares | |
import ( | |
"github.com/labstack/echo" | |
"github.com/labstack/echo/middleware" | |
) | |
func SetJwtMiddlewares(g *echo.Group) { | |
g.Use(middleware.JWTWithConfig(middleware.JWTConfig{ | |
SigningMethod: "HS512", | |
SigningKey: []byte("mySecret"), | |
TokenLookup: "cookie:JWTCookie", | |
})) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the token is generated this way:
i create the cookie this way: