Exemplo n.º 1
0
        public AspNetHttpHandler(
            IRouteCollection routes,
            ICache cache,
            IEnumerable <IResponseGenerator> responseGenerators,
            IEnumerable <IResponseHandler> responseHandlers,
            IAntiCsrfCookieManager antiCsrfCookieManager,
            IAntiCsrfNonceValidator antiCsrfNonceValidator,
            IAntiCsrfResponseGenerator antiCsrfResponseGenerator)
        {
            routes.ThrowIfNull("routes");
            cache.ThrowIfNull("cache");
            responseGenerators.ThrowIfNull("responseGenerators");
            responseHandlers.ThrowIfNull("responseHandlers");
            antiCsrfCookieManager.ThrowIfNull("antiCsrfSessionManager");
            antiCsrfNonceValidator.ThrowIfNull("antiCsrfTokenValidator");
            antiCsrfResponseGenerator.ThrowIfNull("antiCsrfResponseGenerator");

            _routes                    = routes;
            _cache                     = cache;
            _responseGenerators        = responseGenerators.ToArray();
            _responseHandlers          = responseHandlers.ToArray();
            _antiCsrfCookieManager     = antiCsrfCookieManager;
            _antiCsrfNonceValidator    = antiCsrfNonceValidator;
            _antiCsrfResponseGenerator = antiCsrfResponseGenerator;
        }
Exemplo n.º 2
0
		public AspNetHttpHandler(
			IRouteCollection routes,
			ICache cache,
			IEnumerable<IResponseGenerator> responseGenerators,
			IEnumerable<IResponseHandler> responseHandlers,
			IAntiCsrfCookieManager antiCsrfCookieManager,
			IAntiCsrfNonceValidator antiCsrfNonceValidator,
			IAntiCsrfResponseGenerator antiCsrfResponseGenerator)
		{
			routes.ThrowIfNull("routes");
			cache.ThrowIfNull("cache");
			responseGenerators.ThrowIfNull("responseGenerators");
			responseHandlers.ThrowIfNull("responseHandlers");
			antiCsrfCookieManager.ThrowIfNull("antiCsrfSessionManager");
			antiCsrfNonceValidator.ThrowIfNull("antiCsrfTokenValidator");
			antiCsrfResponseGenerator.ThrowIfNull("antiCsrfResponseGenerator");

			_routes = routes;
			_cache = cache;
			_responseGenerators = responseGenerators.ToArray();
			_responseHandlers = responseHandlers.ToArray();
			_antiCsrfCookieManager = antiCsrfCookieManager;
			_antiCsrfNonceValidator = antiCsrfNonceValidator;
			_antiCsrfResponseGenerator = antiCsrfResponseGenerator;
		}
Exemplo n.º 3
0
        public AntiCsrfRequestValidator(IAntiCsrfCookieManager antiCsrfCookieManager, IAntiCsrfNonceValidator antiCsrfNonceValidator, IAntiCsrfResponseGenerator antiCsrfResponseGenerator)
        {
            antiCsrfCookieManager.ThrowIfNull("antiCsrfCookieManager");
            antiCsrfNonceValidator.ThrowIfNull("antiCsrfNonceValidator");
            antiCsrfResponseGenerator.ThrowIfNull("antiCsrfResponseGenerator");

            _antiCsrfCookieManager     = antiCsrfCookieManager;
            _antiCsrfNonceValidator    = antiCsrfNonceValidator;
            _antiCsrfResponseGenerator = antiCsrfResponseGenerator;
        }
		public AntiCsrfRequestValidator(IAntiCsrfCookieManager antiCsrfCookieManager, IAntiCsrfNonceValidator antiCsrfNonceValidator, IAntiCsrfResponseGenerator antiCsrfResponseGenerator)
		{
			antiCsrfCookieManager.ThrowIfNull("antiCsrfCookieManager");
			antiCsrfNonceValidator.ThrowIfNull("antiCsrfNonceValidator");
			antiCsrfResponseGenerator.ThrowIfNull("antiCsrfResponseGenerator");

			_antiCsrfCookieManager = antiCsrfCookieManager;
			_antiCsrfNonceValidator = antiCsrfNonceValidator;
			_antiCsrfResponseGenerator = antiCsrfResponseGenerator;
		}