kledac / Sitecore-Owin

OWIN support for Sitecore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sitecore Owin

Sitecore module that provides OWIN support by adding an extension point to use OWIN middlewares through the Sitecore pipeline.

How to install?

Sitecore Owin is available as a nuget package https://www.nuget.org/packages/Sitecore.Owin:

Install-Package Sitecore.Owin

It will install all necessary dependencies as well as patch your web.config by adding:

<appSettings>
  ...    
  <add key="owin:appStartup" value="Sitecore.Owin.Startup, Sitecore.Owin" />
</appSettings>

How to use?

  1. Implement a class with a public method void Process(InitializeOwinMiddlewareArgs args)
public class SampleOwinMiddleware
{
  public void Process(InitializeOwinMiddlewareArgs args)
  {
    args.App.Use((context, next) =>
    {
      context.Response.Headers.Append("Yes", "it works");
      return next();
    });
  }
}
  1. Patch the sitecore/pipelines/initializeOwinMiddleware pipeline to add your processor

Copyright 2016 Vyacheslav Pritykin

About

OWIN support for Sitecore

License:MIT License


Languages

Language:C# 100.0%