public WardenIterationController(IWardenService wardenService, IOrganizationService organizationService, IApiKeyService apiKeyService, IUserService userService, ISignalRService signalRService) : base(apiKeyService, userService) { _wardenService = wardenService; _organizationService = organizationService; _signalRService = signalRService; }
public ApiKeyController(IApiKeyService apiKeyService, ApiKeyProvider apiKeyProvider, IImageService imageSerivice) { this.apiKeyService = apiKeyService; this.apiKeyProvider = apiKeyProvider; this.imageService = imageSerivice; }
public SettingsController(IUserService userService, IApiKeyService apiKeyService) { _userService = userService; _apiKeyService = apiKeyService; }
public InitializationService(IApiKeyService apiKeyService, IUserRepository userRepository, IEncrypter encrypter) { _apiKeyService = apiKeyService; _userRepository = userRepository; _encrypter = encrypter; }
public MeetupService(IApiKeyService apiKeyService) { _apiKeyService = apiKeyService; }
protected ApiController(IApiKeyService apiKeyService, IUserService userService) { ApiKeyService = apiKeyService; UserService = userService; }
public ApiKeyAuthorizeAsyncFilter(ILogger <ApiKeyAuthorizeAsyncFilter> logger, IApiKeyService apiKeyService) { _logger = logger; _apiKeyService = apiKeyService; }
protected ApiController(IApiKeyService apiKeyService, IUserService userService) { ApiKeyService = apiKeyService; UserService = userService; }
public ApiKeyController(IApiKeyService service) { _service = service; }
public ServiceHttpTests() { var builder = new ConfigurationBuilder().AddUserSecrets <ServiceHttpTests>(); _apiKeyService = new ApiKeyService(builder.Build()); }
public ApiKeyAuthorizeAsyncFilter(ILogger <ApiKeyAuthorizeAsyncFilter> logger, IApiKeyService apiKeyService) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (apiKeyService == null) { throw new ArgumentNullException(nameof(apiKeyService)); } this.logger = logger; this.apiKeyService = apiKeyService; }
public AbpNuGetIndexUrlService(IApiKeyService apiKeyService) { _apiKeyService = apiKeyService; Logger = NullLogger <AbpNuGetIndexUrlService> .Instance; }
public WeatherService(IApiKeyService apiKeyService) { _apiKeyService = apiKeyService; }
public ComputeHashOverride(ILoggingService loggingService, IApiKeyService apiKeyService, ICachingService cachingService) : base(loggingService, apiKeyService, cachingService) { }
public AuthController(ILogger <AuthController> logger, IApiKeyService service) { _logger = logger; _service = service; }
public ApiKeyModule(IApiKeyService apiKeyService) : base("api-keys") { Get("", async args => await FetchCollection <BrowseApiKeys, ApiKey> (async x => await apiKeyService.BrowseAsync(x)).HandleAsync()); }
public GetHeaderValuesOverride(ILoggingService loggingService, IApiKeyService apiKeyService, ICachingService cachingService) : base(loggingService, apiKeyService, cachingService) { }
public IsValidRequestOverride(ILoggingService loggingService, IApiKeyService apiKeyService, ICachingService cachingService) : base(loggingService, apiKeyService, cachingService) { }
public CurrencyRateQueryService(IApiKeyService apiKeyService) { this.apiKeyService = apiKeyService; }
public SettingsController(IUserService userService, IApiKeyService apiKeyService) { _userService = userService; _apiKeyService = apiKeyService; }
public void Process(ScheduledTaskContext context) { if (context.Task.TaskType == TaskType) { try { Logger.Information("ExternalContent task item #{0} version {1} scheduled at {2} utc", context.Task.ContentItem.Id, context.Task.ContentItem.Version, context.Task.ScheduledUtc); var displayalias = context.Task.ContentItem.As <AutoroutePart>().DisplayAlias; // // using (var wc = _ using (var wc = shellContext.LifetimeScope.Resolve<IWorkContextAccessor>().CreateWorkContextScope()) { //// var tenantSiteName = wc.Resolve<ISiteService>().GetSiteSettings().SiteName; // var wc = _workContextAccessor.CreateWorkContextScope(); // var workcontext = WorkContextExtensions.GetWorkContext(wc); //// var tenantSiteName = wc.Resolve<ISiteService>().GetSiteSettings().SiteName; // var settings = workContext.Resolve<ShellSettings>(); // _shellSettings. //var httpContextAccessor = GlobalConfiguration.Configuration.DependencyResolver.GetService(typeof(IHttpContextAccessor)) as IHttpContextAccessor; //var workContext = WorkContextExtensions.GetWorkContext(httpContextAccessor.Current().Request.RequestContext); //return workContext.CurrentSite.BaseUrl; string CallUrl = _orchardServices.WorkContext.CurrentSite.BaseUrl; //var host = _shellSettings.RequestUrlHost; var prefix = _shellSettings.RequestUrlPrefix; //if (!string.IsNullOrEmpty(host)) // CallUrl += host; if (!string.IsNullOrEmpty(prefix) && prefix.ToLower() != "default") { CallUrl += "/" + prefix; } CallUrl += @"/Webservices/Alias?displayalias=" + displayalias; // var urlHelper = new UrlHelper(wc.HttpContext.Request.RequestContext); // var CallUrl = urlHelper.ItemDisplayUrl(context.Task.ContentItem); // HostingEnvironment.MapPath("~/") + _shellSettings.Name + "\\Webservices\\Alias?displayalias=" + displayalias; WebClient myClient = new WebClient(); IApiKeyService apiKeyService = null; if (_orchardServices.WorkContext.TryResolve <IApiKeyService>(out apiKeyService)) { var iv = GetRandomIV(); var key = apiKeyService.GetValidApiKey(iv); // protezione attiva inserisco header myClient.Headers.Set("ApiKey", key); myClient.Headers.Set("AKIV", iv); } Stream response = myClient.OpenRead(CallUrl); response.Close(); } catch (Exception e) { Logger.Error(e, e.Message); } finally { try { var fields = context.Task.ContentItem.Parts.SelectMany(x => x.Fields.Where(f => f.FieldDefinition.Name == typeof(FieldExternal).Name)).Cast <FieldExternal>(); Int32 minuti = 0; foreach (var field in fields) { var settings = field.PartFieldDefinition.Settings.GetModel <FieldExternalSetting>(); if (settings.ScheduledMinute > 0) { minuti = settings.ScheduledMinute; } } if (minuti > 0) { _fieldExternalService.ScheduleNextTask(minuti, context.Task.ContentItem); } } catch (Exception e) { Logger.Error(e, e.Message); } } } }
public UserService(IUserRepository userRepository, IApiKeyService apiKeyService, IEncrypter encrypter) { _userRepository = userRepository; _apiKeyService = apiKeyService; _encrypter = encrypter; }
public SuiteCommand(IApiKeyService apiKeyService) { _apiKeyService = apiKeyService; Logger = NullLogger <SuiteCommand> .Instance; }
public KeyAuthHandler(IApiKeyService apiKeyService, IOptionsMonitor <KeyAuthOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) { _apiKeyService = apiKeyService; }
public TenantController() { _tenantAppService = IocManager.Instance.Resolve <ITenantAppService>(); _apiKeyService = IocManager.Instance.Resolve <IApiKeyService>(); }