Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class Microsoft.​Extensions.​DependencyInjection.​IdentityServerServiceCollectionExtensions

Assembly: Duende.IdentityServer

Inheritance: object → IdentityServerServiceCollectionExtensions

DI extension methods for adding IdentityServer

Methods

public static IIdentityServerBuilder
AddIdentityServerBuilder​(IServiceCollection services)
Creates an <see cref="T:Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder" /> that wraps the given service collection, providing a fluent API for further IdentityServer configuration.
Returns An <see cref="T:Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder" /> for chaining additional IdentityServer configuration.
services The ASP.NET Core service collection to wrap.
public static IIdentityServerBuilder
AddIdentityServer​(IServiceCollection services)
Registers IdentityServer and all of its required services into the ASP.NET Core dependency injection container. This includes platform services, cookie authentication, core services, all protocol endpoints, pluggable services (token creation, consent, events, etc.), automatic key management, dynamic external identity providers, request validators, response generators, and default secret parsers and validators. In-memory stores for persisted grants and pushed authorization requests are registered as defaults; replace them with durable implementations for production.
Returns An <see cref="T:Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder" /> for chaining additional IdentityServer configuration such as signing credentials, client/resource stores, and custom services.
services The ASP.NET Core service collection to register IdentityServer services into.
public static IIdentityServerBuilder
AddIdentityServer​(IServiceCollection services, System.​Action<​Duende.​IdentityServer.​Configuration.​IdentityServerOptions> setupAction)
Registers IdentityServer and all of its required services into the ASP.NET Core dependency injection container, applying the provided configuration delegate to <see cref="T:Duende.IdentityServer.Configuration.IdentityServerOptions" /> before registration.
Returns An <see cref="T:Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder" /> for chaining additional IdentityServer configuration such as signing credentials, client/resource stores, and custom services.
services The ASP.NET Core service collection to register IdentityServer services into.
setupAction A delegate used to configure <see cref="T:Duende.IdentityServer.Configuration.IdentityServerOptions" /> , such as setting the issuer URI, enabling CORS, customizing endpoint paths, or adjusting token lifetimes.
public static IIdentityServerBuilder
AddIdentityServer​(IServiceCollection services, Configuration.​IConfiguration configuration)
Registers IdentityServer and all of its required services into the ASP.NET Core dependency injection container, binding <see cref="T:Duende.IdentityServer.Configuration.IdentityServerOptions" /> from the provided <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> section.
Returns An <see cref="T:Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder" /> for chaining additional IdentityServer configuration such as signing credentials, client/resource stores, and custom services.
services The ASP.NET Core service collection to register IdentityServer services into.
configuration An <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> section (e.g. from <c>appsettings.json</c> ) whose values are bound to <see cref="T:Duende.IdentityServer.Configuration.IdentityServerOptions" /> .
public static IServiceCollection
AddOidcStateDataFormatterCache​(IServiceCollection services, string[] schemes)
Configures the OpenIdConnect handlers to persist the state parameter into the server-side IDistributedCache. This prevents the state cookie from growing too large when using external identity providers.
services The ASP.NET Core service collection to configure.
schemes The OpenIdConnect authentication scheme names to configure. If none are provided, all registered OpenIdConnect schemes will use the distributed cache for state storage.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object