Exemple #1
0
        /// <inheritdoc />
        public async Task Handle(HttpRequest request, HttpResponse response, RouteData routeData)
        {
            _executionContextConfigurator.ConfigureFor(_tenantResolver.Resolve(request), Guid.NewGuid(), ClaimsPrincipal.Current.ToClaims());

            var installationId = long.Parse(request.Query["installation_id"].Single());

            switch (request.Query["setup_action"].Single())
            {
            case "install":
                _callbackHandler.Install(installationId, response);
                break;

            case "update":
                _callbackHandler.Update(installationId, response);
                break;
            }

            await Task.CompletedTask;
        }
Exemple #2
0
        public async Task Handle(HttpRequest request, HttpResponse response, RouteData routeData)
        {
            // TODO: This endpoint should be secured like all the others, so that when the final request gets here, we should know the tenant

            _executionContextConfigurator.ConfigureFor(_tenantResolver.Resolve(request), Guid.NewGuid(), ClaimsPrincipal.Current.ToClaims());

            var installationId = long.Parse(request.Query["installation_id"].Single());

            switch (request.Query["setup_action"].Single())
            {
            case "install":
                _callbackHandler.Install(installationId, response);
                break;

            case "update":
                _callbackHandler.Update(installationId, response);
                break;
            }

            await Task.CompletedTask;
        }