Remember Me
forgot your password?

Advantages of Php Authentication

We discussed there that HTTP Basic Authentication has a number of drawbacks, and that you can avoid those with PHP-based authentication.The PHPLib features sophisticated classes for handling user authentication and permission management. The PHPLib authenticates sessions; thus it depends on the Session class.

On those pages in which you need authentication, the following page_open() call should be made to instantiate a session and authentication object:

page_open(array(“sess” => “Session_Example”, “auth” => “Auth_Example”));

Being based on sessions introduces a number of advantages for the authentication:

The username and the authentication element are sent only once, at the login. Once authenticated, the server stores the authentication data inside the session, and doesn’t transmit username or authentication element again.This is different than in HTTP Basic Authentication, where the username and password are transmitted in the HTTP headers of each request. But it also means that, if you lose the session, you lose the authentication.

  • The authentication procedure on the server can be complex. It can use any database or any other mechanism you can think of.The authentication is handled by an undefined function of the Auth class (auth_validatelogin()) and you have to implement it. 214 Chapter 6 Database Access with PHP
  • It’s not limited to a whole directory, but can be different for individual files of the application, and can even implement authentication levels inside a script. It’s possible to hide parts of the script from users who are not allowed to access them.
  • Users who aren’t known to the system can register themselves before logging in. A registration form is offered and the PHPLib will automatically create a standard entry in the user database.
  • Authentication via PHPLib works even with the CGI version of PHP.
  • You can log users out cleanly.This means that you can give your users the chance to terminate the current sessions (a logout button).
  • Users can be logged out automatically after a certain idle time. Doing so provides additional security for your application, because you can prevent session hijacking after a longer idle time.
Rate this Article: 4 / 5 stars - 1 vote(s)
Print Email Re-Publish

Add new Comment



Captcha

  • Latest Web Design Articles
  • More from Joomla Panel

How many pages do you need for a business website

By: Bill | 03/01/2010
In tight economic times businesses tend to cut back on spending wherever possible. When it comes to websites, just how much cutting back can you get away with? Let's take a look at which pages are essential for a company website.

Web Hosting Albuquerque: It’s Easy to Find the Albuquerque Web Hosting Your Business Needs

By: Vikram kuamr | 03/01/2010
These days, it has become increasingly important for all businesses to have an online presence as it provides them the global reach that no offline marketing can offer them.

Improve Your Business with an Albuquerque Web Designer: Thomas Garcia Studio

By: Vikram kuamr | 03/01/2010
If you have your own business or if you are considering starting one of your own, you should have a look at the various options for creating an online presence.

Important Web Design Tips to Remember in 2010

By: Benjamin Marc | 03/01/2010
This article contains web design tip to remember in 2010.

Web design costing explained

By: Bill | 02/01/2010
With Web Design, the costs can be prohibitive to the small or hobby business. Most people trying to arrange for a first website to be built are confused by the price differences from company to company. Often, what at first seems too cheap to be true ends up being just that when you add the functions which make the website more than just an online advert. I'll try to break down the basics of what's involved in website design.

Calgary Web Designing Solutions and web design company

By: Gerry | 02/01/2010
Nowadays almost anything can be sold online. Thus, it is not enough to simply have a website. In order to be taken seriously you need a professional site. Competitors are countless, and you want to stand out of the crowds, don't you?

Building Traffic with Effective Website Construction

By: John Mahoney | 02/01/2010
Website construction is a very important job that demands understanding of the human psychology and knowledge about the needs and demands of the target audience of the website that s/he is designing

The Dos and Don'ts of Website Design

By: John Mahoney | 02/01/2010
Website design has become one of the mot important aspects of advertising these days, the reason behind this being the gaining significance of the virtual marketplace. According to the latest statistics, almost 12.5% people in the entire world use the Internet to find what they are looking for, and this is a pretty respectable figure. However, with the rising competition online, effective website design can be challenging to the designers and webmasters engaging in the activity.

Submit Your Articles Free: Signup
Article Categories




Use of this web site constitutes acceptance of the Terms Of Use and Privacy Policy | User published content is licensed under a Creative Commons License.
Copyright © 2005-2008 Free Articles by ArticlesBase.com, All rights reserved. (0.10, 1, w3)