PHP Classes

OO Auth: Manage life time limited sessions securely

Recommend this page to a friend!
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 47%Total: 4,457 All time: 634 This week: 89Up
Version License Categories
ooauth 1.0.0Free for non-comm...User Management, Security
Description 

Author

This class is meant to create and manage sessions used for authentication of users at a given site.

The class manages the storage of some control values in the session and also any variables defined by the developers and set by the application scripts.

It can create a session and validate its integrity to prevent stealing by verifying the if the IP address of the user that created the session is the same during all accesses, thus enforcing an additional security level.

It can also limit the life time of a session by verifying if it passed a given timeout period since its creation.

If the session is no longer valid because it was stolen or it exceeded its life time limit, the class will destroy the session and redirect to a given URL or display an error message. Error message can be localized.

Picture of Heiko Dillemuth
  Performance   Level  
Name: Heiko Dillemuth <contact>
Classes: 3 packages by
Country: Germany Germany
Age: 54
All time rank: 35620 in Germany Germany
Week rank: 312 Up18 in Germany Germany Up

Details

*** Readme ooauth *** (Start: 02.04.2004) Sinn und Zweck: ooauth bietet eine zeitgesteuerte Session an. Außerdem wird eine freie Variable bei jedem Durchgang mit abgeprüft. Wir nutzen das zum Tracken der IP Adresse, die, wenn sie sich ändert, die Sitzung dann ungültigt macht. Zusätzlich lassen sich Variablen in der Session speichern und zurücklesen. Geht aber seit PHP4 auch genau so gut über die $_SESSION[] Variablen. Wurde eine Sitzung ungültig, z.B. wg. eines Timeout, gibt die Checkroutinge "false" zurück. Darauf kann Dein Programm individuell reagieren. Der Grund wird immer als Fehlermeldung (last error) gespeichert. Der Logout/Login Bildschirm kann diese Meldung dann ausgeben. Die Felhermeldungen können personalisiert werden. Es ist möglich eigene Fehler und -gründe zu erzeugen. Die Session kümmert sich nicht um das Holen und checken von Usernamen und Passwörtern. Das ist Sache der Programmierer und macht die Klasse flexibler. !!!!!!!! ACHTUNG: !!!!!!!! Die Klasse ist brandneu und wird noch nicht produktiv eingesetzt. Für mich wäre jetzt auch mal ein bisschen Feedback nötig. Die Funktionen beruhen auf meinen eigenen Bedürfnissen. Wäre aber auch interessant, welche Funktionen noch brauchbar wären. Heiko at dillemuth dot de 14.07.2004 --------------------------------------------------------------------------- *** Readme ooauth *** (10.03.2004) ooauth offers timing collected sessions. futhermore, a free variable is checked in each session, which we use for tracking of the ip addresses. If the address changes, the session becomes invalid. Variables can also be added+saved in the session, not needed any more since the new $_SESSINO[] Variables in PHP4. If a session becomes invalid, e.g. because of a timeout, you can redirect it to your Logout/Login URL, which was defined in advance. Or an error message is printed (cusomized) if you want to. The reason for the error is stored in the last error, which can be printed out. The session does not take care of getting username & password. This has to be taken care of the programmer and makes the class more flexible. !Note! This is a beta version. Do not use for critical apps! Please be so kind as to give a little feedback to me!

  Files folder image Files  
File Role Description
Accessible without login Plain text file class_ooauth_login.php Example Online Demo Script for Login-Screen (see also index.php)
Accessible without login Plain text file class_oouth_ex2.php Example Useful example
Accessible without login Plain text file class_oouth_licence.txt Lic. Licence
Accessible without login Plain text file index.php Example Example Scipt to test the Class (works with class_ooauth_login.php
Plain text file ooauth_class.php Class Class file ooauth 1.01rc1
Accessible without login Plain text file readme.txt Doc. Readme (german/english)
Accessible without login Plain text file test_ooauth.php Example Example File

 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,457
This week:0
All time:634
This week:89Up
 User Ratings  
 
 All time
Utility:60%StarStarStarStar
Consistency:67%StarStarStarStar
Documentation:57%StarStarStar
Examples:50%StarStarStar
Tests:-
Videos:-
Overall:47%StarStarStar
Rank:2972