add API JWT auth.

This commit is contained in:
Miroslav Šedivý
2020-10-31 10:48:24 +01:00
parent 31bd61e2d3
commit 71d39a5c74
5 changed files with 73 additions and 17 deletions

View File

@ -39,7 +39,7 @@ func New(
router.Use(Logger) // Log API request calls using custom logger function
// Mount REST API
apiManager := api.New(sessions, remote, broadcast, webSocketHandler)
apiManager := api.New(sessions, remote, broadcast, webSocketHandler, conf)
apiManager.Mount(router)
router.Get("/ws", func(w http.ResponseWriter, r *http.Request) {