auth moved from websockets to session.

This commit is contained in:
Miroslav Šedivý
2020-11-01 18:39:12 +01:00
parent 3ea979ed47
commit c10b2212d1
8 changed files with 65 additions and 53 deletions

View File

@ -1,5 +1,7 @@
package types
import "net/http"
type Session interface {
ID() string
Name() string
@ -38,4 +40,7 @@ type SessionManager interface {
OnDestroy(listener func(id string))
OnCreated(listener func(session Session))
OnConnected(listener func(session Session))
// auth
Authenticate(r *http.Request) (string, string, bool, error)
}