
Component Name: TmWebLogin
        Author: Mats Asplund
 Creation Date: 2003-03-25
       Version: 1.0
   Description: A component that generates a web login dialog, validates the
                login and sends a cookie to the user.
        E-mail: masprod@telia.com
       Website: http://go.to/masdp
  Legal Issues: All rigths reserved 2003 by Mats Asplund


Usage:
  This software is provided 'as-is', without any express or
  implied warranty.  In no event will the author be held liable
  for any  damages arising from the use of this software.

  Permission is granted to anyone to use this software for any
  purpose, including commercial applications, and to alter it
  and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented,
     you must not claim that you wrote the original software.
     If you use this software in a product, an acknowledgment
     in the product documentation would be appreciated but is
     not required.

  2. Altered source versions must be plainly marked as such, and
     must not be misrepresented as being the original software.

  3. This notice may not be removed or altered from any source
     distribution.

  4. If you decide to use this software in any of your applications.
     Send me an EMail and tell me about it.

Quick Reference:
  TmWebLogin inherits from TComponent.
  TmCookie inherits from TPersistent.

  Key-Properties:
    Cookie:             Class that controls the Cookie that will be sent over
                        to the user if the login is a success.
      Cookie.ValuePair: <Username> = <Password>
      Cookie.Values:    A TStringList containing the Valuepairs (just one needed).
      Cookie.ADomain:   Use ADomain to limit the recipients of the cookie to
                        certain domains.
      Cookie.APath:     Use Path to limit the recipients of the cookie to certain
                        paths.
      Cookie.AExpires:  How long the Cookie will "live". If you set this value
                        to -1, the Cookie will be "killed" when the user closes
                        his browser.
      Cookie.ASecure:   Set Secure to True if the Web client must use a secure
                        connection when sending the Cookie header.

    UserName:    The username.
    Password:    The password.
    Action:      The webaction used to validate the given username and password.
    Method:      Get or Post. Get will show the username and password in the
                 browsers addressfield. Use Post instead.
    Caption:     The login dialog caption.
    BgColor:     The login dialog background color.
    Width:       The login dialog width in pixels.
    UserCaption: Caption above the username field.
    PwdCaption:  Caption above the password field.
    BtnCaption:  SubmitButton caption.

  Key-Methods:
    Content:     The HTML-code for the login dialog.
    CheckCookie: Returns true if the cookie is present in the webrequest.
    ValidateLoginSetCookieIfOK:
                 Returns true and delivers the cookie, if the username and
                 password is OK.

