Home arrow JavaScript arrow Building a CHAP Login System: An Object-Oriented Approach

Building a CHAP Login System: An Object-Oriented Approach

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.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 30
September 12, 2005
  1. · Building a CHAP Login System: An Object-Oriented Approach
  2. · Using a procedural script: a quick overview of the previous login system
  3. · Taking the object-oriented approach: using a session handling class
  4. · Putting the pieces together: integrating the “ChallengeGenerator” class

print this article

Building a CHAP Login System: An Object-Oriented Approach
(Page 1 of 4 )


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.

blog comments powered by Disqus

- Project Nashorn to Make Java, JavaScript Wor...
- JavaScript Virus Attacks Tumblr Blogs
- Google Releases Stable Dart Version, JavaScr...
- Khan Academy Unveils New JavaScript Learning...
- Accessing Nitro? There`s an App for That
- JQuery 2.0 Leaving Older IE Versions Behind
- Fastest JavaScript Engine Might Surprise You
- Microsoft Adjusting Chakra for IE 10
- Brendan Eich: We Don`t Need Google Native Cl...
- An Overview of JavaScript Statements
- An Overview of JavaScript Operators
- Overview of JavaScript Variables
- More of the Top jQuery Social Plugins
- The Top jQuery Social Plugins
- More of the Top jQuery Slider Plugins

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials