Add client token authentication #92
@@ -11,6 +11,8 @@ class ClientManager {
|
|||||||
constructor(opt) {
|
constructor(opt) {
|
||||||
this.opt = opt || {};
|
this.opt = opt || {};
|
||||||
|
|
||||||
|
this.opt.tokens = this.opt.tokens || {};
|
||||||
|
|
||||||
// id -> client instance
|
// id -> client instance
|
||||||
this.clients = new Map();
|
this.clients = new Map();
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@
|
|||||||
"ws": "5.1.1"
|
"ws": "5.1.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha --check-leaks --require esm './**/*.test.js'",
|
"test": "mocha --check-leaks --require esm ./**/*.test.js",
|
||||||
"start": "./bin/server",
|
"start": "./bin/server",
|
||||||
"dev": "node-dev bin/server --port 3000"
|
"dev": "node-dev bin/server --port 3000"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user