Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols

Imports BusinessBLL.Security

<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class LoginService
     Inherits System.Web.Services.WebService

    <WebMethod()> _
    Public Function GetTicket(ByVal id As String, ByVal password As String, ByVal userData As String) As LoginInformation
        Dim information As LoginInformation
        If password = "Password" Then
            information.Name = id
            information.IssueDate = DateTime.Now
            information.Expiration = DateTime.MaxValue
            information.Roles = Nothing
            information.UserData = userData
        Else
            information.Name = Nothing
            information.IssueDate = DateTime.MinValue
            information.Expiration = DateTime.MinValue
            information.Roles = Nothing
            information.UserData = userData
        End If
        Return information
    End Function
End Class
