Пример #1
0
 public CaseworkerService(ICaseworkerHttpClientHelper caseworkerHttpClient, IConfiguration config, IHttpContextAccessor httpContextAccessor)
 {
     _caseworkerHttpClient = caseworkerHttpClient ?? throw new ArgumentNullException(nameof(caseworkerHttpClient));
     _config        = config;
     _correlationId = httpContextAccessor.HttpContext.TraceIdentifier;
     _clientId      = httpContextAccessor.HttpContext.User.Claims.First(x => x.Type == "azp").Value;
 }
Пример #2
0
 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);
 }