Esempio n. 1
0
 public static IServiceCollection AddApiAuthFilter(this IServiceCollection services,
                                                   IAuthFilter authFilter, params IActionTypeFilter[] filters)
 {
     if (services == null)
     {
         throw new ArgumentNullException(nameof(services));
     }
     if (authFilter == null)
     {
         throw new ArgumentNullException(nameof(authFilter));
     }
     return(AddApiAuthFilter(services,
                             new GlobalAuthFilterApplicationFactoryInstanceWrapper(authFilter, filters ?? new IActionTypeFilter[0])));
 }
Esempio n. 2
0
 public static IServiceCollection AddApiAuthFilter(this IServiceCollection services, IAuthFilter authFilter,
                                                   string namespacePrefix)
 {
     if (namespacePrefix == null)
     {
         throw new ArgumentNullException(nameof(namespacePrefix));
     }
     return(AddApiAuthFilter(services, authFilter, new NamespaceActionTypeFilter(namespacePrefix)));
 }
Esempio n. 3
0
 public void SetAuthFilter(IAuthFilter filter)
 {
     throw new NotImplementedException();
 }