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
Copy file name to clipboardExpand all lines: src/content/docs/identityserver/ui/login/dynamicproviders.md
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,15 +15,16 @@ of Duende IdentityServer, enables providers to be configured dynamically from a
15
15
16
16
## Dynamic Identity Providers
17
17
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.
20
21
Additionally, you'd have to re-run your startup code for new authentication handlers to be picked up by ASP.NET Core.
21
22
22
23
The authentication handler architecture in ASP.NET Core was not designed to have many statically registered authentication
23
24
handlers registered in the service container and Dependency Injection (DI) system. At some point you will incur a
24
25
performance penalty for having too many of them.
25
26
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.
27
28
Dynamic configuration addresses the performance concern and allows changes to the configuration to a running server.
28
29
29
30
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.
174
175
As part of the architecture of the dynamic providers feature, different callback paths are required and are
175
176
automatically set to follow a convention. The convention of these paths follows the form of `~/federation/{scheme}/{suffix}`.
176
177
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
+
177
183
There are three paths that are set on the `OpenIdConnectOptions`:
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,
302
314
303
315
To register other authentication handlers, you can use the `AddProviderType<T, TOptions, TIdentityProvider>(string scheme)` method on the `DynamicProviderOptions` object,
304
316
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