Name

FormsAuthenticationTicket

Synopsis

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 NotInheritable Class FormsAuthenticationTicket
                  ' Public Constructors
   Public Sub New(ByVal version As Integer, 
        ByVal name As String, ByVal issueDate As Date, 
        ByVal expiration As Date, 
        ByVal isPersistent As Boolean, 
        ByVal userData As String) 
   Public Sub New(ByVal version As Integer, 
        ByVal name As String, ByVal issueDate As Date, 
        ByVal expiration As Date, 
        ByVal isPersistent As Boolean, 
        ByVal userData As String, 
        ByVal cookiePath As String) 
   Public Sub New(ByVal name As String, 
        ByVal isPersistent As Boolean, 
        ByVal timeout As Integer) 
' Public Instance Properties
   Public ReadOnly Property CookiePath As String  
   Public ReadOnly Property Expiration As Date  
   Public ReadOnly Property Expired As Boolean  
   Public ReadOnly Property IsPersistent As Boolean  
   Public ReadOnly Property IssueDate As Date  
   Public ReadOnly Property Name As String  
   Public ReadOnly Property UserData As String  
   Public ReadOnly Property Version As Integer  
End Class

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.