26ff8d9b4f
Set up repository with legacy .NET Framework 4.8 source (OLD/), new .NET 10 Blazor solution (NEW/), OpenSpec specifications, documentation, and project configuration.
34 lines
1.0 KiB
C#
Executable File
34 lines
1.0 KiB
C#
Executable File
using Microsoft.AspNet.Identity;
|
|
using Microsoft.AspNet.SignalR;
|
|
using Microsoft.Owin;
|
|
using Microsoft.Owin.Security.Cookies;
|
|
using Owin;
|
|
using WebInterface;
|
|
|
|
[assembly: OwinStartup(typeof(OwinStartup))]
|
|
|
|
namespace WebInterface
|
|
{
|
|
/// <summary>
|
|
/// OWIN configurator
|
|
/// </summary>
|
|
public class OwinStartup
|
|
{
|
|
/// <summary>
|
|
/// Configure OWIN framework
|
|
/// </summary>
|
|
/// <param name="app">Application configuration to setup</param>
|
|
public void Configuration(IAppBuilder app)
|
|
{
|
|
HubConfiguration hubConfiguration = new HubConfiguration {EnableJavaScriptProxies = true};
|
|
app.MapSignalR("/signalr", hubConfiguration);
|
|
|
|
app.UseCookieAuthentication(new CookieAuthenticationOptions
|
|
{
|
|
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
|
|
LoginPath = new PathString("/Account/Login"),
|
|
CookieSecure = CookieSecureOption.SameAsRequest
|
|
});
|
|
}
|
|
}
|
|
} |