Single User Access Login

Login is essential in any secured applications. Normally, you have to either purchase a stand alone Login component or write one yourself to integrate into the particular application. Tornado offers two levels of integrated Login support - PoorMan and DB style. Once the dbLogin property is defined, the Login/Logout action is activated. This example illustrates the PoorMan style in which ID+Password list is stored in a text file file. The DB version uses a DB source to control the logins and is easily an application by itself at the expense of this 1 lines of code (.dbLogin). Putting in ID+Passwords in the aspx file is as secure as the aspx file itself.

Note: This Login is a Single User Access Login. That means, you cannot login more than once.

Poorman Login

<!--T_Login_1.aspx-->

<script language="vb" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
   Dim GD as New Tornado.GetData()
   Dim LOG1 As New Tornado.Z()
   With LOG1
      .dbQP="U=50| S=gold| M=g!sys=t| Xf=0,1| D=Nwind.mdb| Q=Orders| Gdf=0,1,2,3| Th=tit=Single Access Login!Sub=Use asp/db; hello/world; John/Doe; Mary/Jane to login"
      .dbLogin = "type=PoorMan|passfile=/bin/pass.txt,application1| titletxt=Tornado Login| FromAddr=frank@aspdb.com| EmailSubject=Your Password| Email Body=Your password for [[LoginID]] is [[password]]| SMTPServer=Your_SMTP_Server"
      .ASPdbNET()
   End With

'... Display currently login users
   Dim s() As String = GD.get_Login_users
   If Not IsNothing(s) Then
      Response.Write("<HR>Login users<br>")
      Dim i As Integer
      For i = 0 To UBound(s)
         Response.Write(s(i) & "<BR>")
      Next
   End If
End Sub
</script>

The Poorman style implementation is a quick way to secure an application. The password list can be stored in the aspx file or in an external file.