public static ModuleCatalog AddFrameworkModules(this ModuleCatalog moduleCatalog) { return moduleCatalog .AddModule(typeof (RibbonModule)) .AddModule(typeof (NotificationsModule)) .AddModule(typeof (ExplorerModule), dependsOn: "TranslationModule") ; }
/// <summary> /// By default, clients that are reconnecting to the server will be removed from all groups they may have previously been a member of. /// Enabling AutoRejoiningGroups allows all clients to rejoin the all of the hub groups the claim to be a member of automatically /// on connect and reconnect. /// Enabling this module may be insecure because untrusted clients may claim to be a member of groups they were never authorized to join. /// </summary> /// <param name="pipeline">The <see cref="IHubPipeline" /> to which the <see cref="AutoRejoiningGroupsModule" /> will be added.</param> public static void EnableAutoRejoiningGroups(this IHubPipeline pipeline) { if (pipeline == null) { throw new ArgumentNullException("pipeline"); } pipeline.AddModule(new AutoRejoiningGroupsModule()); }
/// <summary> /// Requiring Authentication adds an <see cref="AuthorizeModule"/> to the <see cref="IHubPipeline" /> with <see cref="IAuthorizeHubConnection"/> /// and <see cref="IAuthorizeHubMethodInvocation"/> authorizers that will be applied globally to all hubs and hub methods. /// These authorizers require that the <see cref="System.Security.Principal.IPrincipal"/>'s <see cref="System.Security.Principal.IIdentity"/> /// IsAuthenticated for any clients that invoke server-side hub methods or receive client-side hub method invocations. /// </summary> /// <param name="pipeline">The <see cref="IHubPipeline" /> to which the <see cref="AuthorizeModule" /> will be added.</param> public static void RequireAuthentication(this IHubPipeline pipeline) { if (pipeline == null) { throw new ArgumentNullException("pipeline"); } var authorizer = new AuthorizeAttribute(); pipeline.AddModule(new AuthorizeModule(globalConnectionAuthorizer: authorizer, globalInvocationAuthorizer: authorizer)); }
public static void EnableAutoRejoiningGroups(this IHubPipeline pipeline) { pipeline.AddModule(new AutoRejoiningGroupsModule()); }
public static void RequireAuthentication(this IHubPipeline pipeline) { var authorizer = new AuthorizeAttribute(); pipeline.AddModule(new AuthorizeModule(globalConnectionAuthorizer: authorizer, globalInvocationAuthorizer: authorizer)); }
public static DiscordClient UsingDynamicPerms(this DiscordClient client) { client.AddService(new DynamicPermissionService()); client.AddModule<DynamicPermissionModule>("Dynamic Permissions"); return client; }
public static ModuleCatalog AddFrameworkExtensionModules(this ModuleCatalog moduleCatalog) { return moduleCatalog .AddModule(typeof(TranslationModule)); }
public static ModuleCatalog AddClientModules(this ModuleCatalog moduleCatalog) { return moduleCatalog .AddModule(typeof(ClientResourcesModule)) .AddModule(typeof(PersonModule)); }