// 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
{
///
/// Represents the session state options for the application.
///
public class SessionOptions
{
///
/// Determines the cookie name used to persist the session ID.
/// Defaults to .
///
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.
/// Defaults to .
///
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);
}
}