This overview is an introduction to the concepts, and covers what you need to get started. There is more detailed documentation in the links from this page about all of the options available for configuring the Owin pipeline and the middleware components.
The Owin Framework is built on Microsoft OWIN. The way that Microsoft OWIN works is by chaining middleware into a pipeline, then passing each http request through the pipeline until one of the middleware chooses to handle the request and return a response.
In the Microsoft world the application developer constructs a pipeline of middleware components using code that looks like this:
public void Configuration(IAppBuilder app) { app.Use(new Middleware1()) .Use(new Middleware2()) .Use(new Middleware3()) .Use(new Middleware4()); }
This Owin Framework contains middleware that can be added to the Owin pipeline, and internally implements a richer middleware definition that adds:
For a more complete description of how all of this works, see the Owin Framework Conceptual Overview.
When using the Owin Framework, the application code for setting up the middleware pipeline looks like this example:
public void Configuration(IAppBuilder app) { var builder = new Builder(); builder.Register(new NotFoundError()) .As("staticFilesNotFoundError") .RunAfter("loginId") .ConfigureWith(configuration, "/owin/notFound/staticFiles"); builder.Register(new FormsIdentification()) .As("loginId") .ConfigureWith(configuration, "/owin/auth/forms"); app.Use(builder); }
Note that the app.Use(builder); line at the end is calling the extension method that is defined by the Microsoft OWIN assembly. The code above that is specific to the Owin Framework.
Note that each middleware that is added to the Builder has fluent syntax for defining the configuration provider and the path within the configuration file to the configuration data for that middleware.
Note that each middleware can be named, and these names can be used to define dependencies. The Builder will add them to the Owin pipeline in an order that satisfies these dependencies.
The Owin Framework provides a simple standardization of middleware configuration so that:
How to use Urchin as a configuration provider
How to use the web.config file for configuration data
For details of how to configure specific NuGet packages see the author's documentation for their package. In general Owin Framework middleware packages will have a Configuration class within the source code that is deserialized from the JSON configuration file. You can look at this source code to determine the definitive list of properties that can be configured.
The Index of NuGet packages has links the documentation and source code for all Owin Framework NuGet packages.