You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When calling downstream api from a console application allowed schemes are not fetched properly. This is because IAuthenticationSchemeProvider is not registered and aspnet core ITokenAcquisitionHost is used by default.
Describe the solution you'd like
Ability to inject ITokenAcquisitionHost but I would ideally like idweb to not be dependent on asp.net core dlls, but anything to make it work would suffice.
Describe alternatives you've considered
Taking dependency on asp.net core myself and registering the type.
Additional context
The text was updated successfully, but these errors were encountered:
In .NET 5+, we now use the DefaultTokenAcquisitionHost (the host for SDK apps) instead of the
Asp.NET core one, when the service collection was not initialized by ASP.NET Core (that is
the `IWebHostEnvironment` is not present in the collection.
If developers want the ASP.NET Core host, they would need to use the WebApplication.CreateBuilder().Services instead
of instanciating a simple service collection.
* Fix for #2371
# Features:
- In AspNET Core 3.1 and Net 5+, we now use the DefaultTokenAcquisitionHost (the host for SDK apps) instead of the
Asp.NET Core one, when the service collection was not initialized by ASP.NET Core (that is the `IWebHostEnvironment` is not present in the collection. If you want the ASP.NET Core host, you would need to use the WebApplication.CreateBuilder().Services instead
of instantiating a simple service collection.
- In Web APIs, GetAuthenticationResultForUserAsync tries to find the inbound token from user.Identity.BootstrapContext first (if not null), and then from the token acquisition host. This will help for non-asp.NET Core Azure functions for instance
- New PrincipalExtensionsForSecurityTokens.GetBootstrapToken method that extracts a Security token from the bootstrap context (+unit tests)
Co-authored-by: jennyf19 <jeferrie@microsoft.com>
Is your feature request related to a problem? Please describe.
When calling downstream api from a console application allowed schemes are not fetched properly. This is because IAuthenticationSchemeProvider is not registered and aspnet core ITokenAcquisitionHost is used by default.
Describe the solution you'd like
Ability to inject ITokenAcquisitionHost but I would ideally like idweb to not be dependent on asp.net core dlls, but anything to make it work would suffice.
Describe alternatives you've considered
Taking dependency on asp.net core myself and registering the type.
Additional context
The text was updated successfully, but these errors were encountered: