This is a Node.js library that provides implementations for @horwood/socket-server's SocketAuthenticator class. Currently MongoSocketAuthenticator is the only implementation available and, as the name suggests, uses a MongoDB instance to handle authentication.
It can be installed through the NPM registry by using the following command:
$ npm install @horwood/socket-authenticator
To make best use of it, it is also recommended to install @horwood/socket-server.
It is fairly simple to make use of. All it requires is for MongoSocketAuthenticator to be passed to SecureSocketServer's authenticator function. Once this is done, the server will delegate the handling of authentication events to your authenticator. It's also important to note that in order for MongoSocketAuthenticator to work, the application must have an active connection to MongoDB.