Esempio n. 1
0
 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));
     });
 }
Esempio n. 2
0
 public void SetOutbound(IAppBuilder builder)
 {
     builder.SessionCookie(envKey, passPhrase);
     builder.Run(this.setFunc);
 }
Esempio n. 3
0
 public void CaptureInbound(IAppBuilder builder)
 {
     builder.SessionCookie(envKey, passPhrase);
     builder.Run(this.captureFunc);
 }