dotnet / dotnet/AspNetCore.Docs
If the SUT uses a Bearer Authentication Scheme with IdentityServer, "Bearer" scheme already exists
- Dominant language
- C#
- Stars
- 13.1k
- Forks
- 24.6k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 97
Description
When looking at this document, it appears to work fine when using a basic authentication scheme, but when the Startup of the SUT contains the following, and an attempt is made to use a custom Bearer Auth scheme as per the doc, the error "Bearer" scheme already exists:
`services
.AddAuthentication(IdentityServerAuthenticationDefaults.AuthenticationScheme)
.AddIdentityServerAuthentication(options =>
{
options.Authority = "https://myidentityserver.com";
});`
Is there a simple way to override the IdentityServer configuration from the SUT?
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 77889d43-fedb-f8b4-8fea-379ec946555c
* Version Independent ID: f499b131-8b14-7e10-1728-543fdd5a5656
* Content: [Integration tests in ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-3.0)
* Content Source: [aspnetcore/test/integration-tests.md](https://github.com/dotnet/AspNetCore.Docs/blob/master/aspnetcore/test/integration-tests.md)
* Product: **aspnet-core**
* Technology: **aspnetcore-test**
* GitHub Login: @Rick-Anderson
* Microsoft Alias: **riande**
Contributor guide
Assessment
This issue has not been assessed yet.