public VeracityPlatformService(HttpClient client, IVeracityIntegrationConfigService configurationServices, IHttpContextAccessor httpContext)
 {
     _httpContext = httpContext.HttpContext;
     _veracityIntegrationOptions = configurationServices.GetVeracityIntegrationConfig();
     client.BaseAddress          = new Uri(_veracityIntegrationOptions.VeracityPlatformServiceUrl);
     client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", _veracityIntegrationOptions.VeracityPlatformServiceKey);
     Client = client;
 }
        public virtual VeracityIntegrationOptions GetVeracityIntegrationConfig()
        {
            if (this.azureAdB2COptions != null)
            {
                return(this.azureAdB2COptions);
            }

            this.azureAdB2COptions = new VeracityIntegrationOptions();
            this.configuration.GetValue <VeracityIntegrationOptions>(SectionKey);
            this.configuration.GetSection(SectionKey).Bind(this.azureAdB2COptions);
            return(this.azureAdB2COptions);
        }
 public VeracityOpenIdManager(IVeracityIntegrationConfigService configurationServices)
 {
     _azureAdB2COptions    = configurationServices.GetVeracityIntegrationConfig();
     _veracityOpenIdOption = o =>
     {
         o.Authority        = _azureAdB2COptions.Authority;
         o.ClientId         = _azureAdB2COptions.ClientId;
         o.UseTokenLifetime = true;
         o.ClientSecret     = _azureAdB2COptions.ClientSecret;
         o.Events           = new OpenIdConnectEvents
         {
             OnRedirectToIdentityProvider = OnRedirectToIdentityProviderAsync,
             OnAuthorizationCodeReceived  = OnAuthorizationCodeReceivedAsync,
         };
     };
 }