Пример #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="services"></param>
 /// <param name="authenticationSchemes">sets a comma delimited list of schemes from which user information is constructed.</param>
 /// <returns></returns>
 public static IServiceCollection SetAuthenticationSchemes(this IServiceCollection services, string authenticationSchemes)
 {
     AuthorizeWrapperAttribute.SetAttributeCreator(a => new AuthorizeAttribute {
         Roles = a.Roles, AuthenticationSchemes = authenticationSchemes
     });
     return(services);
 }
Пример #2
0
 static ServiceFactory()
 {
     AuthorizeWrapperAttribute.SetAttributeCreator(a => new AuthorizeAttribute {
         Roles = a.Roles, AuthenticationSchemes = "OAuth2", Policy = a.Policy
     });
 }
Пример #3
0
 static ServiceFactory()
 {
     AuthorizeWrapperAttribute.SetAttributeCreator(a => new AuthorizeAttribute {
         Roles = a.Roles, Users = a.Users
     });
 }