/// <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); }
static ServiceFactory() { AuthorizeWrapperAttribute.SetAttributeCreator(a => new AuthorizeAttribute { Roles = a.Roles, AuthenticationSchemes = "OAuth2", Policy = a.Policy }); }
static ServiceFactory() { AuthorizeWrapperAttribute.SetAttributeCreator(a => new AuthorizeAttribute { Roles = a.Roles, Users = a.Users }); }