Created
October 8, 2015 01:00
-
-
Save phillipsj/b4b6ba3367b48bb37cc6 to your computer and use it in GitHub Desktop.
Setting DataProtectionProvider Alternative
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OwinMiddlewares : IOwinMiddlewareProvider { | |
public ILogger Logger { get; set; } | |
public OwinMiddlewares() { | |
Logger = NullLogger.Instance; | |
} | |
public IEnumerable<OwinMiddlewareRegistration> GetOwinMiddlewares() { | |
var middlewares = new List<OwinMiddlewareRegistration>(); | |
middlewares.Add(new OwinMiddlewareRegistration | |
{ | |
Priority = "9", | |
Configure = app => { | |
app.SetDataProtectionProvider(new MachineKeyProtectionProvider()); | |
} | |
}); | |
return middlewares; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment