JavaScript
  Home arrow JavaScript arrow Building a CHAP Login System: An Object-Or...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Building a CHAP Login System: An Object-Oriented Approach
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 8
    2005-09-12

    Table of Contents:
  • Building a CHAP Login System: An Object-Oriented Approach
  • Using a procedural script: a quick overview of the previous login system
  • Taking the object-oriented approach: using a session handling class
  • Putting the pieces together: integrating the “ChallengeGenerator” class

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Building a CHAP Login System: An Object-Oriented Approach


    (Page 1 of 4 )

    Welcome to the last part of the series “Building a CHAP login system.” In three parts, this tutorial provides the basics for building secure login forms, by utilizing the Challenge Handshake Authentication Protocol (known popularly as CHAP). The programming foundation of the system resides primarily on the implementation of the cryptographic MD5 hashing algorithm in JavaScript for sending out encrypted data to the server, which in turn authenticates the client.

    Introduction

    Referring back to the previous article, strong attention was put on developing some PHP functions, which together comprised the core engine for generating random strings, as well as registering session variables. The JavaScript code was able to use this random value and build up the proper MD5 hashes to be transmitted to the server.

    Asides from explaining a procedural approach for generating server-side random seeds, I introduced some modifications to the original JavaScript program with the purpose of providing an updated method for performing data validation, even when this topic is out of the article’s scope.

    In this final part of the series, I shall do two things. First, I will provide a quick overview of the CHAP login system I developed. Second, I’ll focus on the makings of a PHP class for encapsulating all the required processing for generating random seeds and managing session variables. The starting point for building the wrapping class will be the procedural script that you saw in the previous part of the series.

    With the objectives of the articles clearly defined, let’s get started.

    More JavaScript Articles
    More By Alejandro Gervasio


       · The final part of the series looks at an object-based approach to generate...
       · A very interesting article, (as far as it goes!)I have recently developed a...
       · Thank you for commenting on my article. Now, with reference to your problem, make...
       · Since my comment yesterday where I said I was having a problem with the results of...
       · Thank you for your reply. Also, I'm glad to know that you already solved the...
     

    JAVASCRIPT ARTICLES

    - Using Click Interceptions with a Database-Dr...
    - Using JavaScript Click Interceptions in an I...
    - Using Click Interceptions with JavaScript
    - QuickSort in Action
    - Quicksort
    - Using Mod_Security to Protect Your Server
    - Detecting and Countering Server Intrusions
    - Securing Your Web Server
    - Building a Secure Web Server
    - Protecting the Server
    - Book Review: Learning the Yahoo! User Interf...
    - Dynamically Generate a Selection List in a R...
    - Intergrate DWR into Your Java Web Application
    - Detect Browser Compatibility with the Reques...
    - Using the EXT JS Date Picker Widget






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT