Refactor: Inline AuthHubClient Optionen durch Konfigurationsabschnitt ersetzen
This commit is contained in:
parent
97d5156bbb
commit
e28f4560d6
@ -50,10 +50,7 @@ try
|
||||
|
||||
var authPublicKey = config.GetSection("AuthPublicKey").Get<ClientPublicKey>() ?? throw new InvalidOperationException("The AuthPublicKey configuration is missing or invalid.");
|
||||
|
||||
builder.Services.AddAuthHubClient(config, opt =>
|
||||
{
|
||||
opt.PublicKeys.Add(authPublicKey);
|
||||
});
|
||||
builder.Services.AddAuthHubClient(config.GetSection("AuthClientParams"));
|
||||
|
||||
builder.Services.AddControllers();
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DigitalData.Auth.Client" Version="1.1.4.1" />
|
||||
<PackageReference Include="DigitalData.Auth.Client" Version="1.1.5" />
|
||||
<PackageReference Include="DigitalData.Core.API" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.13" />
|
||||
<PackageReference Include="NLog" Version="5.3.4" />
|
||||
|
||||
@ -78,10 +78,12 @@
|
||||
}
|
||||
},
|
||||
"AuthClientParams": {
|
||||
"Url": "https://localhost:7192"
|
||||
},
|
||||
"AuthPublicKey": {
|
||||
"Issuer": "auth.digitaldata.works",
|
||||
"Audience": "work-flow.digitaldata.works"
|
||||
"Url": "https://localhost:7192",
|
||||
"PublicKeys": [
|
||||
{
|
||||
"Issuer": "auth.digitaldata.works",
|
||||
"Audience": "work-flow.digitaldata.works"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user