diff --git a/server/server_handlers.go b/server/server_handlers.go index a9213ee..3932eb7 100644 --- a/server/server_handlers.go +++ b/server/server_handlers.go @@ -33,7 +33,12 @@ type serverHandlers struct { cfg config.Configurator } -func (h *serverHandlers) OnConnection(soc ogw.Socket) { +func (h *serverHandlers) OnConnection(ctx *fasthttp.RequestCtx) bool { + + return true +} + +func (h *serverHandlers) OnConnected(soc ogw.Socket) { // tokenString := string(soc.Conn().Headers().Cookie("AuthToken")) tokenString := "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJvdmVyRmxvdyIsImlhdCI6MTUwNDU5NTExOSwiZXhwIjoxNTM2MTMxMTE5LCJhdWQiOiJ3d3cub3ZlcmZsb3cuY2xvdWQiLCJzdWIiOiJvdmVyZmxvd0Bsb2FmbGUuY29tIn0.-WQi3OykPlJ9x8RcZGhWXEtGw4GhU6wmyJ_AWh2rMeUatQylfPzvmum2Xfp6pwKLMmcP76XoDPNyq06i7RKWNQ" token, err := jwt.Parse(tokenString, func(token *jwt.Token) (interface{}, error) {