Show / Hide Table of Contents

# Class OpenIddictValidationOwinMiddleware

Provides the entry point necessary to register the OpenIddict validation handler in an OWIN pipeline. Note: this middleware is intented to be used with dependency injection containers that support middleware resolution, like Autofac. Since it depends on scoped services, it is NOT recommended to instantiate it as a singleton like a regular OWIN middleware.

##### Inheritance

System.Object
OpenIddictValidationOwinMiddleware

###### Namespace: OpenIddict.Validation.Owin

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

##### Syntax

    public class OpenIddictValidationOwinMiddleware : AuthenticationMiddleware<OpenIddictValidationOwinOptions>

### Constructors

#### OpenIddictValidationOwinMiddleware(Nullable<OwinMiddleware>, IOptionsMonitor<OpenIddictValidationOwinOptions>, IOpenIddictValidationDispatcher, IOpenIddictValidationFactory)

Creates a new instance of the OpenIddictValidationOwinMiddleware class.

##### Declaration

    public OpenIddictValidationOwinMiddleware(OwinMiddleware? next, IOptionsMonitor<OpenIddictValidationOwinOptions> options, IOpenIddictValidationDispatcher dispatcher, IOpenIddictValidationFactory factory)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Nullable<OwinMiddleware> | next | The next middleware in the pipeline, if applicable.
IOptionsMonitor<OpenIddictValidationOwinOptions> | options | The OpenIddict validation OWIN options.
IOpenIddictValidationDispatcher | dispatcher | The OpenIddict validation dispatcher.
IOpenIddictValidationFactory | factory | The OpenIddict validation factory.

### Methods

#### CreateHandler()

Creates and returns a new OpenIddictValidationOwinHandler instance.

##### Declaration

    protected override AuthenticationHandler<OpenIddictValidationOwinOptions> CreateHandler()

##### Returns

Type | Description
--- | ---
AuthenticationHandler<OpenIddictValidationOwinOptions> | A new instance of the OpenIddictValidationOwinHandler class.