public ControllerAuthorization(IAuthorizeAttributeCache authorizeAttributeCache, IAuthorizationContextCache authorizationContextCache, RouteCollection routes)
        {
            Guard.IsNotNull(authorizeAttributeCache, "authorizeAttributeCache");
            Guard.IsNotNull(authorizationContextCache, "authorizationContextCache");
            Guard.IsNotNull(routes, "routes");

            this.authorizeAttributeCache   = authorizeAttributeCache;
            this.authorizationContextCache = authorizationContextCache;
            this.routes = routes;
        }
        public ControllerAuthorization(IAuthorizeAttributeCache authorizeAttributeCache, IAuthorizationContextCache authorizationContextCache, RouteCollection routes)
        {
            Guard.IsNotNull(authorizeAttributeCache, "authorizeAttributeCache");
            Guard.IsNotNull(authorizationContextCache, "authorizationContextCache");
            Guard.IsNotNull(routes, "routes");

            this.authorizeAttributeCache = authorizeAttributeCache;
            this.authorizationContextCache = authorizationContextCache;
            this.routes = routes;
        }
        public AuthorizationContextCacheTests()
        {
            requestContext = TestHelper.CreateRequestContext();
            controllerTypeCache = new ControllerTypeCache(new NoCache())
            {
                ReferencedAssemblies = (() => new List<Assembly> { GetType().Assembly })
            };

            controllerContextCache = new ControllerContextCache(new NoCache(), controllerTypeCache);
            controllerDescriptorCache = new ControllerDescriptorCache(new NoCache(), controllerTypeCache);
            authorizationContextCache = new AuthorizationContextCache(new NoCache(), controllerContextCache, controllerDescriptorCache);
        }
        public AuthorizationContextCacheTests()
        {
            requestContext      = TestHelper.CreateRequestContext();
            controllerTypeCache = new ControllerTypeCache(new NoCache())
            {
                ReferencedAssemblies = (() => new List <Assembly> {
                    GetType().Assembly
                })
            };

            controllerContextCache    = new ControllerContextCache(new NoCache(), controllerTypeCache);
            controllerDescriptorCache = new ControllerDescriptorCache(new NoCache(), controllerTypeCache);
            authorizationContextCache = new AuthorizationContextCache(new NoCache(), controllerContextCache, controllerDescriptorCache);
        }
 public AuthorizationService(
     IAuthorizationContextCache authorizationContextCache,
     IEnumerable <IAuthorizationHandler> handlers,
     ICallerContextProvider callerContextProvider,
     IConfigurationProvider configurationProvider,
     IFeatureService featureService,
     Lazy <EmployerAccountsDbContext> db)
 {
     _authorizationContextCache = authorizationContextCache;
     _handlers = handlers;
     _callerContextProvider = callerContextProvider;
     _configurationProvider = configurationProvider;
     _featureService        = featureService;
     _db = db;
 }
Пример #6
0
 public ControllerAuthorization(IAuthorizeAttributeCache authorizeAttributeCache, IAuthorizationContextCache authorizationContextCache, RouteCollection routes)
 {
     this.authorizeAttributeCache   = authorizeAttributeCache;
     this.authorizationContextCache = authorizationContextCache;
     this.routes = routes;
 }
Пример #7
0
 public ControllerAuthorization(IAuthorizeAttributeCache authorizeAttributeCache, IAuthorizationContextCache authorizationContextCache, RouteCollection routes)
 {
     this.authorizeAttributeCache = authorizeAttributeCache;
     this.authorizationContextCache = authorizationContextCache;
     this.routes = routes;
 }