Providing A Custom Channels Authoriser
function ourCustomAuthorizer (context, socketId, callback) {
// get auth data somehow
// if all goes well:
callback(false, authData);
// otherwise:
callback(true, "some error string describing what went wrong");
}var supportedAuthorizers = Pusher.Runtime.getAuthorizers();
supportedAuthorizers.ourCustomAuthorizer = ourCustomAuthorizer;
Pusher.Runtime.getAuthorizers = function () {
return supportedAuthorizers;
};Last updated