public PublishModule(IPublishService publishService, IAuthoriser authoriser)
            : base(authoriser, "/services/publish")
        {
            _publishService = publishService;

            Post["/{mode}"] = InvokePublishing;
            Post["/listofitems"] = InvokePublishingOfListOfItems;
            Get["/lastcompleted"] = LastCompleted;
            Get["/lastcompleted/{source}/{target}/{language}"] = LastCompleted;
        }
Beispiel #2
0
 public AuthorisationMiddleware(RequestDelegate next,
                                IRequestScopedDataRepository requestScopedDataRepository,
                                IAuthoriser authoriser,
                                IOcelotLoggerFactory loggerFactory)
     : base(requestScopedDataRepository)
 {
     _next       = next;
     _authoriser = authoriser;
     _logger     = loggerFactory.CreateLogger <AuthorisationMiddleware>();
 }
Beispiel #3
0
        public PublishModule(IPublishService publishService, IAuthoriser authoriser)
            : base(authoriser, "/services/publish")
        {
            _publishService = publishService;

            Post["/{mode}"]       = InvokePublishing;
            Post["/listofitems"]  = InvokePublishingOfListOfItems;
            Get["/lastcompleted"] = LastCompleted;
            Get["/lastcompleted/{source}/{target}/{language}"] = LastCompleted;
        }
Beispiel #4
0
        public InstallerModule(IPackageRepository repository, IAuthoriser authoriser, ITempPackager tempPackager, IInstallationRecorder installationRecorder)
            : base(authoriser, "/services")
        {
            _repository           = repository;
            _tempPackager         = tempPackager;
            _installationRecorder = installationRecorder;

            Post["/package/install/fileupload"] = InstallUploadPackage;

            Post["/package/install"] = InstallPackage;

            Get["/package/latestversion"] = LatestVersion;
        }
Beispiel #5
0
        public InstallerModule(IPackageRepository repository, IAuthoriser authoriser, ITempPackager tempPackager, IInstallationRecorder installationRecorder)
            : base(authoriser, "/services")
        {
            _repository = repository;
            _tempPackager = tempPackager;
            _installationRecorder = installationRecorder;

            Post["/package/install/fileupload"] = InstallUploadPackage;

            Post["/package/install"] = InstallPackage;

            Get["/package/latestversion"] = LatestVersion;
        }
Beispiel #6
0
        protected ShipBaseModule(IAuthoriser authoriser, string modulePath)
            : base(modulePath)
        {
            _authoriser = authoriser;

            Before += AuthoriseRequest;

            Before += ctx =>
            {
                ctx.Items.Add(StartTime, DateTime.UtcNow);
                return(null);
            };

            After += AddProcessingTimeToResponse;
        }
        protected ShipBaseModule(IAuthoriser authoriser, string modulePath)
            : base(modulePath)
        {
            _authoriser = authoriser;

            Before += AuthoriseRequest;

            Before += ctx =>
            {
                ctx.Items.Add(StartTime, DateTime.UtcNow);
                return null;
            };

            After += AddProcessingTimeToResponse;
        }
        public InstallerModule(IPackageRepository repository, IAuthoriser authoriser, ITempPackager tempPackager, IInstallationRecorder installationRecorder)
            : base("/services")
        {
            _repository = repository;
            _authoriser = authoriser;
            _tempPackager = tempPackager;
            _installationRecorder = installationRecorder;

            Before += AuthoriseRequest; 
            
            Before += ctx =>
            {
                ctx.Items.Add(StartTime, DateTime.UtcNow);
                return null;
            };

            After += AddProcessingTimeToResponse;

            Post["/package/install/fileupload"] = InstallUploadPackage;

            Post["/package/install"] = InstallPackage;

            Get["/package/latestversion"] = LatestVersion;
        }
 public RepositoryBase(IRepository <T, TKeyType> crud, IValidator <T, TKeyType> validator, IAuthoriser <T, TKeyType> authoriser)
 {
     this.crud       = crud;
     this.validator  = validator;
     this.authoriser = authoriser;
 }
 protected BaseHttpHandler(IAuthoriser authoriser)
 {
     _authoriser = authoriser;
 }
Beispiel #11
0
 public UserRepo(ICrud <User, Guid> crud, IValidator <User, Guid> validator, IAuthoriser <User, Guid> authoriser) : base(crud, validator, authoriser)
 {
 }
 public AuthoriserDecoratorForQueries(IQueryHandler <TQuery, TResult> handler, IAuthoriser <TQuery> authoriser)
 {
     _authoriser = authoriser;
     _handler    = handler;
 }
Beispiel #13
0
 public ToDoRepo(ICrud <ToDoItem, Guid> crud, IValidator <ToDoItem, Guid> validator, IAuthoriser <ToDoItem, Guid> authoriser) : base(crud, validator, authoriser)
 {
 }
Beispiel #14
0
 public AuthoriserDecorator(ICommandHandler <T> handler, IAuthoriser <T> authoriser)
 {
     _authoriser = authoriser;
     _handler    = handler;
 }
 protected BaseHttpHandler(IAuthoriser authoriser)
 {
     _authoriser = authoriser;
 }
 public void SetUp()
 {
     _context = HttpContextBuilder.MockHttpContext();
     _configurationProvider = new Mock<IConfigurationProvider<PackageInstallationSettings>>();
     _authoriser = new HttpRequestAuthoriser(_context.Object, _configurationProvider.Object);
 }
 public PackageInstaller(HttpContextBase context, IAuthoriser requestAuthoriser, IDictionary<string, Action<HttpContextBase>> httpMethodActions)
 {
     _context = context;
     _requestAuthoriser = requestAuthoriser;
     _methodActions = httpMethodActions;
 }
Beispiel #18
0
 public AboutModule(IAuthoriser authoriser)
     : base(authoriser, "/services/about")
 {
     Get["/"] = parameters => View["about.html"];
 }
Beispiel #19
0
 public SampleHandler(IAuthoriser authoriser)
     : base(authoriser)
 {
 }