mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Added basic login
This commit is contained in:
1 parent
bde4e861c2
commit
4224875fb0
14 files changed
+524
-5
No files matched your search
@@ -1,5 +1,8 @@
|
||||
using Artemis.WebClient.Workshop.Repositories;
|
||||
using Artemis.WebClient.Workshop.Services;
|
||||
using DryIoc;
|
||||
using DryIoc.Microsoft.DependencyInjection;
|
||||
using IdentityModel.Client;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Artemis.WebClient.Workshop.DryIoc;
|
||||
@@ -20,7 +23,16 @@ public static class ContainerExtensions
|
||||
.AddHttpClient()
|
||||
.AddWorkshopClient()
|
||||
.ConfigureHttpClient(client => client.BaseAddress = new Uri("https://localhost:7281/graphql"));
|
||||
|
||||
|
||||
serviceCollection.AddSingleton<IDiscoveryCache>(r =>
|
||||
{
|
||||
IHttpClientFactory factory = r.GetRequiredService<IHttpClientFactory>();
|
||||
return new DiscoveryCache(IAuthenticationService.AUTHORITY, () => factory.CreateClient());
|
||||
});
|
||||
|
||||
container.WithDependencyInjectionAdapter(serviceCollection);
|
||||
|
||||
container.Register<IAuthenticationRepository, AuthenticationRepository>(Reuse.Singleton);
|
||||
container.Register<IAuthenticationService, AuthenticationService>(Reuse.Singleton);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user