3
0

Refactor JWT implementation

This commit is contained in:
Denis Arh
2022-01-14 22:19:25 +01:00
parent 2e0adf43b7
commit 59ec77e204
47 changed files with 730 additions and 536 deletions

View File

@@ -85,12 +85,8 @@ func (s server) Serve(ctx context.Context) {
r.Use(LogResponse)
}
println("using up DefaultJwtHandler", auth.DefaultJwtHandler != nil)
r.Use(
auth.DefaultJwtHandler.HttpVerifier(),
auth.DefaultJwtHandler.HttpAuthenticator(),
)
// Verifies JWT in headers, cookies, ...
r.Use(auth.JWT().HttpVerifier())
for _, mountRoutes := range s.endpoints {
mountRoutes(r)