public static void RequireAuthentication(this HubOptions options)
{
if (options == null)
{
throw new ArgumentNullException(nameof(options));
}
var authorizer = new AuthorizeAttribute();
options.PipelineModules.Add(new AuthorizeModule(globalConnectionAuthorizer: authorizer, globalInvocationAuthorizer: authorizer));
}
}