aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/main.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-28 16:00:22 +0900
committernsfisis <nsfisis@gmail.com>2024-07-28 16:01:01 +0900
commitc953b0496ef205ddda0defd70f376623bf13db61 (patch)
tree80ddd24c45612dc1971ddb0b268440bfd2efc067 /backend/main.go
parentd85cf0be57dd4394c588c340fbfa8483d981da02 (diff)
downloadiosdc-japan-2024-albatross-c953b0496ef205ddda0defd70f376623bf13db61.tar.gz
iosdc-japan-2024-albatross-c953b0496ef205ddda0defd70f376623bf13db61.tar.zst
iosdc-japan-2024-albatross-c953b0496ef205ddda0defd70f376623bf13db61.zip
feat(backend): handle JWT validation manually
Diffstat (limited to 'backend/main.go')
-rw-r--r--backend/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/main.go b/backend/main.go
index fa5c079..1ea1fd1 100644
--- a/backend/main.go
+++ b/backend/main.go
@@ -148,7 +148,9 @@ func main() {
apiGroup := e.Group("/api")
apiGroup.Use(oapimiddleware.OapiRequestValidator(openApiSpec))
apiHandler := api.NewHandler(queries)
- api.RegisterHandlers(apiGroup, api.NewStrictHandler(apiHandler, nil))
+ api.RegisterHandlers(apiGroup, api.NewStrictHandler(apiHandler, []api.StrictMiddlewareFunc{
+ api.NewJWTMiddleware(),
+ }))
}
e.GET("/sock/golf/:gameId/watch", func(c echo.Context) error {