public static void SessionConfiguration(IAppBuilder app) { string envKey = "test.session"; string passPhrase = "a pass phrase that is long"; app.SessionCookie(envKey, passPhrase); app.Run(context => { var inboundSession = context.Environment[envKey]; Console.WriteLine("Inbound session: {0}", inboundSession); context.Environment[envKey] = "some session data"; return context.Response.WriteAsync(string.Format("Hello: {0}\n", inboundSession)); }); }
public void SetOutbound(IAppBuilder builder) { builder.SessionCookie(envKey, passPhrase); builder.Run(this.setFunc); }
public void CaptureInbound(IAppBuilder builder) { builder.SessionCookie(envKey, passPhrase); builder.Run(this.captureFunc); }