Show / Hide Table of Contents

# Class OpenIddictServerOwinMiddlewareFactory

Provides the entry point necessary to instantiate and register the scoped OpenIddictServerOwinMiddleware in an OWIN/Katana pipeline.

##### Inheritance

System.Object
OpenIddictServerOwinMiddlewareFactory

###### Namespace: OpenIddict.Server.Owin

###### Assembly: cs.temp.dll.dll

##### Syntax

    public class OpenIddictServerOwinMiddlewareFactory : OwinMiddleware

### Constructors

#### OpenIddictServerOwinMiddlewareFactory(Nullable<OwinMiddleware>)

Creates a new instance of the OpenIddictServerOwinMiddlewareFactory class.

##### Declaration

    public OpenIddictServerOwinMiddlewareFactory(OwinMiddleware? next)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Nullable<OwinMiddleware> | next | The next middleware in the pipeline, if applicable.

### Methods

#### Invoke(IOwinContext)

Resolves the System.IServiceProvider instance from the OWIN context and creates a new instance of the OpenIddictServerOwinMiddleware class, which is used to register OpenIddictServerOwinHandler in the pipeline.

##### Declaration

    public override Task Invoke(IOwinContext context)

##### Parameters

Type | Name | Description
--- | --- | ---
IOwinContext | context | The .

##### Returns

Type | Description
--- | ---
Task | A that can be used to monitor the asynchronous operation.