protected BaseApiClient( AuthorizationServiceHttpClient authorizationServiceHttpClient, AuthServiceControllerBasePathsConfiguration basePathsConfiguration ) { m_authorizationServiceHttpClient = authorizationServiceHttpClient; m_basePathsConfiguration = basePathsConfiguration; }
public AuthServiceControllerBasePathsProvider(AuthServiceControllerBasePathsConfiguration basePathsConfiguration) { m_basePaths = new Dictionary <Type, string> { { typeof(PermissionContract), basePathsConfiguration.PermissionBasePath }, { typeof(PermissionContractBase), basePathsConfiguration.PermissionBasePath }, { typeof(RoleContract), basePathsConfiguration.RoleBasePath }, { typeof(RoleContractBase), basePathsConfiguration.RoleBasePath }, { typeof(UserContractBase), basePathsConfiguration.UserBasePath }, { typeof(BasicUserInfoContract), basePathsConfiguration.UserBasePath }, { typeof(UserContract), basePathsConfiguration.UserBasePath }, { typeof(CreateUserContract), basePathsConfiguration.RegistrationBasePath }, { typeof(ExternalLoginProviderContract), basePathsConfiguration.ExternalLoginProviderBasePath }, }; }
public static void RegisterAuthorizationHttpClientComponents <TClientLocalization>(this IServiceCollection services, AuthServiceCommunicationConfiguration configuration = null, OpenIdConnectConfig openIdConfiguration = null, AuthServiceControllerBasePathsConfiguration pathConfiguration = null) where TClientLocalization : class, IAuthorizationServiceClientLocalization { services.AddSingleton <IAuthorizationServiceClientLocalization, TClientLocalization>(); services.AddSingleton <AuthorizationServiceHttpClient>(); services.AddSingleton <AuthServiceControllerBasePathsProvider>(); services.AddScoped <RegistrationApiClient>(); services.AddScoped <ExternalIdentityProviderApiClient>(); services.AddScoped <FileResourceApiClient>(); services.AddScoped <NonceApiClient>(); services.AddScoped <UserApiClient>(); services.AddScoped <RoleApiClient>(); services.AddScoped <PermissionApiClient>(); services.AddScoped <ContactApiClient>(); services.TryAddScoped <IDateTimeProvider, DateTimeProvider>(); services.TryAddSingleton <AuthApiAccessTokenProvider>(); services.TryAddSingleton <ITokenStorage, InMemoryTokenStorage>(); services.TryAddTransient <ITokenEndpointClient, TokenEndpointClient>(); services.TryAddSingleton <TokenEndpointHttpClientProvider>(); services.TryAddSingleton <Func <ITokenEndpointClient> >(provider => provider.GetRequiredService <ITokenEndpointClient>); if (configuration != null) { services.AddSingleton(configuration); } if (openIdConfiguration != null) { services.AddSingleton(openIdConfiguration); } if (pathConfiguration != null) { services.AddSingleton(pathConfiguration); } }
public NonceApiClient( AuthorizationServiceHttpClient authorizationServiceHttpClient, AuthServiceControllerBasePathsConfiguration basePathsConfiguration ) : base(authorizationServiceHttpClient, basePathsConfiguration) { }
public ExternalIdentityProviderApiClient( AuthorizationServiceHttpClient authorizationServiceHttpClient, AuthServiceControllerBasePathsConfiguration basePathsConfiguration ) : base(authorizationServiceHttpClient, basePathsConfiguration) { }