Skip to content

Commit 71022c0

Browse files
committed
PR feedback
1 parent b72fdd6 commit 71022c0

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/content/docs/identityserver/ui/login/dynamicproviders.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ of Duende IdentityServer, enables providers to be configured dynamically from a
1515

1616
## Dynamic Identity Providers
1717

18-
Authentication handlers for external providers are typically added into your IdentityServer using `AddAuthentication()`
19-
and `AddOpenIdConnect()`. This is fine for a handful of schemes, but becomes harder to manage if you have too many of them.
18+
Authentication handlers for external providers are typically added into your IdentityServer using `AddAuthentication()`,
19+
`AddOpenIdConnect()`, `AddSaml2()`, and other helper methods. This is fine for a handful of schemes, but becomes harder
20+
to manage if you have too many of them.
2021
Additionally, you'd have to re-run your startup code for new authentication handlers to be picked up by ASP.NET Core.
2122

2223
The authentication handler architecture in ASP.NET Core was not designed to have many statically registered authentication
2324
handlers registered in the service container and Dependency Injection (DI) system. At some point you will incur a
2425
performance penalty for having too many of them.
2526

26-
Duende IdentityServer provides support for dynamic configuration of OpenID Connect providers loaded from a store.
27+
Duende IdentityServer provides support for dynamic configuration of authentication handlers loaded from a store.
2728
Dynamic configuration addresses the performance concern and allows changes to the configuration to a running server.
2829

2930
Support for Dynamic Identity Providers is included in the [Duende IdentityServer](https://duendesoftware.com/products/identityserver) Enterprise Edition.
@@ -174,6 +175,11 @@ few social providers statically configured that you would want to display.
174175
As part of the architecture of the dynamic providers feature, different callback paths are required and are
175176
automatically set to follow a convention. The convention of these paths follows the form of `~/federation/{scheme}/{suffix}`.
176177

178+
:::tip
179+
Even if you don't use dynamic providers yet, you may want to consider adopting this pattern for the callback paths.
180+
This will make it easier to transition to dynamic providers in the future.
181+
:::
182+
177183
There are three paths that are set on the `OpenIdConnectOptions`:
178184

179185
* [CallbackPath](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.authentication.remoteauthenticationoptions.callbackpath).
@@ -298,7 +304,13 @@ builder.Services
298304
## Using Non-OIDC Authentication Handlers
299305

300306
Dynamic identity providers in Duende IdentityServer come with an implementation that supports OpenId Connect providers to be registered.
301-
In your solution, it may be necessary to support other authentication providers, such as the `GoogleHandler`, or a SAML-based authentication provider.
307+
In your solution, it may be necessary to support other authentication providers, such as a SAML-based authentication provider.
308+
309+
We have two samples that show how to use non-OIDC authentication handlers with dynamic identity providers:
310+
* Adding the [WS-Federation protocol type](../../../identityserver/samples/ui/#adding-other-protocol-types-to-dynamic-providers)
311+
* Adding the [Saml2 protocol type](../../../identityserver/samples/ui/#using-sustainsyssaml2-with-dynamic-providers), using the [Sustainsys.Saml2](https://saml2.sustainsys.com/) open source library
312+
313+
In this section, we'll look at a minimal example of how to add other authentication handlers, such as the `GoogleHandler`, to dynamic identity providers,
302314

303315
To register other authentication handlers, you can use the `AddProviderType<T, TOptions, TIdentityProvider>(string scheme)` method on the `DynamicProviderOptions` object,
304316
where `T` is the authentication handler type, `TOptions` is the options type for that particular handler, and `TIdentityProvider` is the identity provider type that models the dynamic provider.

0 commit comments

Comments
 (0)