Answer the question
In order to leave comments, you need to log in
How to add authorization via Active Directory to an application that already has JWT-based authorization?
Appendix:
services
.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
{
options.RequireHttpsMetadata = false;
options.TokenValidationParameters = new TokenValidationParameters
{
// ...
};
})
.AddNegotiate(options =>
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
options.EnableLdap(settings =>
{
settings.Domain = "mydomain.net";
settings.MachineAccountName = "administrator";
settings.MachineAccountPassword = "...";
});
}
});
// …
app.UseAuthentication();
app.UseAuthorization();
1 2 host/[email protected]
2 2 host/[email protected]
3 2 host/[email protected]
4 2 host/[email protected]
5 2 host/debian. [email protected]
6 2 host/[email protected]
7 2 host/[email protected]
8 2 host/[email protected]
9 2 host/[email protected] NET
10 2 host/[email protected]
11 2 [email protected]
12 2 [email protected]
13 2 [email protected]
14 2 [email protected]
15 2 [email protected]
16 2 host/[email protected]
17 2 host/M1 @MYDOMAIN.NET
18 2 host/[email protected]
19 2 host/[email protected]
20 2 host/[email protected]
21 2 host/[email protected]
22 2 host/[email protected]
23 2 host/[email protected]
24 2 host/[email protected]
25 2 host/[email protected]
26 2 [email protected]
27 2 [email protected]
28 2 M1 [email protected]
29 2 [email protected]
30 2 [email protected]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question