compose and authority fixes. finish sprints.
This commit is contained in:
@@ -293,8 +293,6 @@ builder.Services.AddSingleton(pluginRegistrationSummary);
|
||||
builder.Services.AddStellaOpsCors(builder.Environment, builder.Configuration);
|
||||
builder.Services.AddRouting(options => options.LowercaseUrls = true);
|
||||
builder.Services.AddProblemDetails();
|
||||
builder.Services.AddStellaOpsResourceServerAuthentication(builder.Configuration, configurationSection: null);
|
||||
builder.Services.AddAuthorization();
|
||||
|
||||
// The Authority validates its own tokens for admin endpoints. Configure the JWKS
|
||||
// backchannel to accept the Authority's self-signed certificate (self-referential).
|
||||
@@ -357,7 +355,8 @@ builder.Services.AddOpenIddict()
|
||||
var aspNetCoreBuilder = options.UseAspNetCore()
|
||||
.EnableAuthorizationEndpointPassthrough();
|
||||
|
||||
if (builder.Environment.IsDevelopment())
|
||||
if (builder.Environment.IsDevelopment()
|
||||
|| string.Equals(Environment.GetEnvironmentVariable("STELLAOPS_DISABLE_TRANSPORT_SECURITY"), "true", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
aspNetCoreBuilder.DisableTransportSecurityRequirement();
|
||||
}
|
||||
@@ -441,6 +440,11 @@ builder.Services.Configure<OpenIddictServerOptions>(options =>
|
||||
options.DisableRollingRefreshTokens = false;
|
||||
});
|
||||
|
||||
// Register StellaOpsBearer JWT authentication AFTER OpenIddict to ensure the scheme
|
||||
// is not overwritten by OpenIddict's authentication provider registration.
|
||||
builder.Services.AddStellaOpsResourceServerAuthentication(builder.Configuration, configurationSection: null);
|
||||
builder.Services.AddAuthorization();
|
||||
|
||||
builder.TryAddStellaOpsLocalBinding("authority");
|
||||
var app = builder.Build();
|
||||
app.LogStellaOpsLocalHostname("authority");
|
||||
|
||||
Reference in New Issue
Block a user