This repository has been archived by the owner on Jun 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSitecore.Owin.xml
96 lines (86 loc) · 2.77 KB
/
Sitecore.Owin.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<project>
<Metadata>
<metadata>
<PackageName>Sitecore Owin</PackageName>
<Author>Vyacheslav Pritykin</Author>
<Version>1.0.0</Version>
<Revision />
<License />
<Comment>OWIN support for Sitecore.
Adds an extension point to use OWIN middlewares through the Sitecore pipeline.
How to use?
1. Add reference to the Sitecore.Owin.dll
2. 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();
});
}
}
3. Patch the sitecore/pipelines/initializeOwinMiddleware pipeline to add your processor</Comment>
<Attributes />
<Readme>Before installing:
1. If you don't have already configured OWIN in your Sitecore instance, than you need to add a new setting into the web.config configuration/appSettings (otherwise, it will conflict with SolrNet.Startup class from the SolrNet.dll):
<appSettings>
...
<add key="owin:appStartup" value="Sitecore.Owin.Startup, Sitecore.Owin" />
<appSettings>
2. If you already have OWIN's Startup class, then you should:
Inherit Sitecore.Owin.Startup class by your implementation.
Add the override keyword to your Configuration method and call it's base implementation anywhere inside:
public override void Configuration(IAppBuilder app)
{
base.Configuration(app);
...
}</Readme>
<Publisher />
<PostStep />
<PackageID />
</metadata>
</Metadata>
<SaveProject>True</SaveProject>
<Sources>
<xfiles>
<Entries>
<x-item>/bin/Microsoft.Owin.dll</x-item>
<x-item>/bin/Microsoft.Owin.Host.SystemWeb.dll</x-item>
<x-item>/bin/Microsoft.Owin.Host.SystemWeb.xml</x-item>
<x-item>/bin/Microsoft.Owin.xml</x-item>
<x-item>/bin/Owin.dll</x-item>
<x-item>/bin/Sitecore.Owin.dll</x-item>
<x-item>/App_Config/Include/Sitecore.Owin.config</x-item>
</Entries>
<Converter>
<FileToEntryConverter>
<Root>/</Root>
<Transforms>
<InstallerConfigurationTransform>
<Options>
<BehaviourOptions>
<ItemMode>Undefined</ItemMode>
<ItemMergeMode>Undefined</ItemMergeMode>
</BehaviourOptions>
</Options>
</InstallerConfigurationTransform>
</Transforms>
</FileToEntryConverter>
</Converter>
<Include />
<Exclude />
<Name>files</Name>
</xfiles>
</Sources>
<Converter>
<TrivialConverter>
<Transforms />
</TrivialConverter>
</Converter>
<Include />
<Exclude />
<Name />
</project>