FormsAuthenticationTicket | serializable |
System.Web.Security (system.web.dll) | sealed class |
This class wraps the information in the Forms authentication cookie.
This information includes the expiration and issue date
(Expiration and IssueDate), the
username (Name), and an application-defined string
that can be stored in the cookie (UserData). An
instance of this class is provided through the
FormsIdentity.Ticket property.
public sealed class FormsAuthenticationTicket {
// Public Constructors
public FormsAuthenticationTicket(int version, string name, DateTime issueDate, DateTime expiration,
bool isPersistent, string userData);
public FormsAuthenticationTicket(int version, string name, DateTime issueDate, DateTime expiration,
bool isPersistent, string userData, string cookiePath);
public FormsAuthenticationTicket(string name, bool isPersistent, int timeout);
// Public Instance Properties
public string CookiePath{get; }
public DateTime Expiration{get; }
public bool Expired{get; }
public bool IsPersistent{get; }
public DateTime IssueDate{get; }
public string Name{get; }
public string UserData{get; }
public int Version{get; }
}
Returned By
FormsAuthentication.{Decrypt( ),
RenewTicketIfOld( )},
FormsIdentity.Ticket
Passed To
FormsAuthentication.{Encrypt( ),
RenewTicketIfOld( )},
FormsIdentity.FormsIdentity( )