How to get project endpoint addresses to configure other projects #1560
Unanswered
Paulo Morgado (paulomorgado)
asked this question in
Q&A
Replies: 2 comments 5 replies
|
David Fowler (@davidfowl) answer on another question hints on a solution for the simple case of |
5 replies
|
For services
.AddAuthentication()
.AddJwtBearer();
services.ConfigureOptions<JwtBearerPostConfigureOptions>();
// ...
private sealed class JwtBearerPostConfigureOptions : IPostConfigureOptions<JwtBearerOptions>
{
private readonly IHttpClientFactory _httpClientFactory;
public JwtBearerPostConfigureOptions(IHttpClientFactory httpClientFactory)
{
_httpClientFactory = httpClientFactory;
}
public void PostConfigure(string? name, JwtBearerOptions options)
{
options.Backchannel = string.IsNullOrEmpty(name) ? _httpClientFactory.CreateClient() : _httpClientFactory.CreateClient(name);
}
}This way, |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
In my Aspire playground I have a very simple identity provider that is used by the other projects.
ASP.NET Core 8.0 JWT bearer infrastructure does not use service discovery and I don't want to force it into the projects, so I'm setting it in Aspire:
How can I get the endpoint for
idpto set inwebService?All reactions