Service Factory

IdentityServer3 contains many features for implementing OpenID Connect and OAuth2. Many of these features have been designed so they can be replaced. This would be useful for the scenarios where the default logic doesn’t match the hosting application’s requirements, or simply the application wishes to provide an entirely different implementation. And in fact, there are some extensibility points within IdentityServer3 that are required to be provided by the hosting application (such as the storage for configuration data or the identity management implementation for validating users’ credentials).

The IdentityServer3.Core.Configuration.IdentityServerServiceFactory holds all these building blocks and must be supplied at startup time using the IdentityServerOptions class (see here for more information on configuration options).

The extensibility points fall into three categories.


The IdentityServerServiceFactory allows setting up a service factory by providing in-memory stores for users, clients and scopes (see here).

Mandatory for production scenarios (but with default in-memory implementations)

Optional (can be replaced, but have default implementations)

See here for more information on registering your custom service and store implementations.