// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; namespace Microsoft.AspNet.Session { public class SessionOptions { /// /// Determines the cookie name used to persist the session ID. The default value is ".AspNet.Session". /// public string CookieName { get; set; } = SessionDefaults.CookieName; /// /// Determines the domain used to create the cookie. Is not provided by default. /// public string CookieDomain { get; set; } /// /// Determines the path used to create the cookie. The default value is "/" for highest browser compatibility. /// public string CookiePath { get; set; } = SessionDefaults.CookiePath; /// /// Determines if the browser should allow the cookie to be accessed by client-side JavaScript. The /// default is true, which means the cookie will only be passed to HTTP requests and is not made available /// to script on the page. /// public bool CookieHttpOnly { get; set; } = true; /// /// The IdleTimeout indicates how long the session can be idle before its contents are abandoned. Each session access /// resets the timeout. Note this only applies to the content of the session, not the cookie. /// public TimeSpan IdleTimeout { get; set; } = TimeSpan.FromMinutes(20); /// /// Gets or sets the session storage manager. This overrides any session store passed into the middleware constructor. /// public ISessionStore Store { get; set; } } }