Beispiel #1
0
 public MeaClient(IConfiguration config, HttpClient httpClient, IHttpContextAccessor httpContextAccessor, IMeaSecretStore meaSecretStore)
 {
     _config         = config;
     _httpClient     = httpClient;
     _meaSecretStore = meaSecretStore;
     _correlationId  = httpContextAccessor.HttpContext.TraceIdentifier;
     _tenant         = httpContextAccessor.HttpContext.User.Claims.FirstOrDefault(x => x.Type == "tenant").Value;
     _mcaConfig      = config.GetSection("MeaAuthorization").Get <IReadOnlyList <MeaAuthorization> >().FirstOrDefault(x => x.KommuneId == _tenant);
 }
 public CaseworkerService(IConfiguration config, ICaseworkerHttpClientHelper caseworkerHttpClient, IHttpContextAccessor httpContextAccessor)
 {
     _config = config;
     _caseworkerHttpClient = caseworkerHttpClient ?? throw new ArgumentNullException(nameof(caseworkerHttpClient));
     _correlationId        = httpContextAccessor.HttpContext.TraceIdentifier;
     _clientId             = httpContextAccessor.HttpContext.User.Claims.First(x => x.Type == "azp").Value;
     _tenant    = httpContextAccessor.HttpContext.User.Claims.FirstOrDefault(x => x.Type == "tenant").Value;
     _mcaConfig = config.GetSection("MeaAuthorization").Get <IReadOnlyList <MeaAuthorization> >().FirstOrDefault(x => x.KommuneId == _tenant);
 }