Owin.Security.AesDataProtectorProvider
- is an AES cryptic provider for OWIN authentication middlewares.
It is based on managed and CSP .Net framework providers.
public class Startup
{
public void Configuration(IAppBuilder app)
{
...
app.UseAesDataProtectorProvider();
...
}
}
...
app.UseAesDataProtectorProvider("my key");
...
...
app.UseAesDataProtectorProvider(null, true);
...
or
...
app.UseAesDataProtectorProvider("my key", true);
...
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/login")
});
app.UseAesDataProtectorProvider();
}
}