|
@@ -102,6 +102,9 @@ func AddToAuthMap(conn *websocket.Conn, token map[string]string, authed bool) er
|
|
|
// check the validity of the token
|
|
// check the validity of the token
|
|
|
func CheckToken(token map[string]string, conn *websocket.Conn, r *http.Request, setup bool) bool {
|
|
func CheckToken(token map[string]string, conn *websocket.Conn, r *http.Request, setup bool) bool {
|
|
|
// great you have token. we see if valid.
|
|
// great you have token. we see if valid.
|
|
|
|
|
+ if token["token"] == "" {
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
config.Logger.Info(fmt.Sprintf("Checking token %s",token["id"]))
|
|
config.Logger.Info(fmt.Sprintf("Checking token %s",token["id"]))
|
|
|
conf := config.Conf()
|
|
conf := config.Conf()
|
|
|
key := conf.KeyFile
|
|
key := conf.KeyFile
|