mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
refactor WS authentication.
This commit is contained in:
@ -21,7 +21,7 @@ type Session interface {
|
||||
}
|
||||
|
||||
type SessionManager interface {
|
||||
New(id string, admin bool, socket WebSocket) Session
|
||||
New(id string, admin bool) Session
|
||||
Get(id string) (Session, bool)
|
||||
Has(id string) bool
|
||||
Destroy(id string) error
|
||||
@ -42,5 +42,5 @@ type SessionManager interface {
|
||||
OnConnected(listener func(session Session))
|
||||
|
||||
// auth
|
||||
Authenticate(r *http.Request) (string, string, bool, error)
|
||||
Authenticate(r *http.Request) (Session, error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user