Ejemplo n.º 1
0
 public static void SetDependency(ref IServiceCollection services, InternalApiCredential internalApiCredential, string authenticationInternalUrl,
                                  JwtTokenSettings jwtTokenSettings, JwtTokenValidation jwtTokenValidation)
 {
     services.AddSingleton <IBusinessApiAuthentication>(a => new BusinessApiAuthentication(internalApiCredential));
     services.AddScoped <IBusinessAuthentications>(a => new BusinessAuthentications(jwtTokenSettings, jwtTokenValidation));
     services.AddScoped <IBusinessUsers>(a => new BusinessUsers(a.GetService <IBusinessApiAuthentication>(), authenticationInternalUrl));
 }
 public BusinessApiAuthentication(IBaseApiConsumer iBaseApiConsumer, InternalApiCredential internalApiCredential)
 {
     _iBaseApiConsumer      = iBaseApiConsumer;
     _internalApiCredential = internalApiCredential;
     _iBaseApiConsumer.SetUrl(_internalApiCredential.Url);
 }
Ejemplo n.º 3
0
 public BusinessApiAuthentication(InternalApiCredential internalApiCredential) : base(internalApiCredential.Url)
 {
     _internalApiCredential = internalApiCredential;
 }