Imports System
Imports System.Collections.Generic
Imports System.IO
Imports System.Runtime.Serialization.Formatters.Binary
Imports System.Text

Public Class AuthenticationTicket
    Private mName As String
    Private mExpiration As DateTime
    Private mIssueDate As DateTime
    Private mRoles As String()
    Private mUserData As String

    Public Sub New()
    End Sub

    Public Sub New(ByVal name As String, ByVal issueDate As DateTime, ByVal expiration As DateTime, ByVal roles As String(), ByVal userData As String)
        mName = name
        mIssueDate = issueDate
        mExpiration = expiration
        mRoles = roles
        mUserData = userData
    End Sub

    Public ReadOnly Property Name() As String
        Get
            Return mName
        End Get
    End Property

    Public ReadOnly Property IssueDate() As DateTime
        Get
            Return mIssueDate
        End Get
    End Property

    Public ReadOnly Property Expiration() As DateTime
        Get
            Return mExpiration
        End Get
    End Property

    Public ReadOnly Property Expired() As Boolean
        Get
            Return mExpiration < DateTime.Now
        End Get
    End Property

    Public ReadOnly Property Roles() As String()
        Get
            Return mRoles
        End Get
    End Property

    Public ReadOnly Property UserData() As String
        Get
            Return mUserData
        End Get
    End Property
End Class
