Closed notedit closed 8 years ago
Websocket are not the same as HTTP, you can do header-authentication only, otherwise just make a REST endpoint and take the user from there, pass these information to a websocket message from client to server
yes but i need get the http request header in the connection.
i have used socketio, socketio can handle this.
Make a PR as you said, I will approve it if it's correct, don't be afraid, go on, I will be happy!
ok
have a pr here https://github.com/kataras/go-websocket/pull/3
i have another idea, maybe we could use a Middleware
req := c.Request()
.
An Iris(v6) example: https://github.com/iris-contrib/examples/blob/master/websocket/main.go#L34
so we can do some auth use cookie and query param