Skip to content

Commit 01daa8a

Browse files
Update aspnetcore/security/authentication/configure-jwt-bearer-authentication.md
Co-authored-by: Rick Anderson <[email protected]>
1 parent 4b20e9e commit 01daa8a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

aspnetcore/security/authentication/configure-jwt-bearer-authentication.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ builder.Services.AddAuthentication()
162162

163163
### JWT with multiple schemes
164164

165-
Some APIs need to support access tokens from multiple issuers. This can be implemented in many ways. Separate APIs and schemes for each issuer can be used. The **AddPolicyScheme** can also be used to choose the correct scheme depending on the token type.
165+
APIs often need to accommodate access tokens from various issuers. Supporting multiple token issuers in an API can be accomplished by:
166+
167+
* **Separate APIs**: Create distinct APIs with dedicated authentication schemes for each issuer.
168+
* [AddPolicyScheme](/dotnet/api/microsoft.aspnetcore.authentication.authenticationbuilder.addpolicyscheme): This method can define multiple authentication schemes and implement logic to select the appropriate scheme based on token properties (e.g., issuer, claims). This approach allows for greater flexibility within a single API.
166169

167170
```csharp
168171
services.AddAuthentication(options =>

0 commit comments

Comments
 (0)