Created
December 14, 2019 01:12
-
-
Save manakuro/faa3cad0255b796c9c2e6300e82543eb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
e.POST("/signIn", handler.SignIn()) | |
// Restricted from here | |
r := e.Group("graphql") | |
key, err := auth.GetRSAPublicKey() | |
logFatal(err) | |
r.Use(middleware.JWTWithConfig(middleware.JWTConfig{ | |
SigningKey: key, | |
SigningMethod: "RS256", | |
})) | |
// graphql | |
h, err := graphql.NewHandler(db) | |
logFatal(err) | |
r.POST("", echo.WrapHandler(h)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment