How to get project endpoint addresses to configure other projects #1560
Unanswered
paulomorgado
asked this question in
Q&A
Replies: 2 comments 5 replies
-
@davidfowl answer on another question hints on a solution for the simple case of |
Beta Was this translation helpful? Give feedback.
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, |
Beta Was this translation helpful? Give feedback.
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
idp
to set inwebService
?Beta Was this translation helpful? Give feedback.
All reactions