Hauthlite is a project mainly written in PHP, it's free.
Lite user authentication module for Kohana 3.1 >
hauthlite is an Lite User Authentication Module for session user managment. This module is for Kohana 3.1 or later.
For database config:
For file coonfig:
array("user" => "username", "pass" => "password", "session" => "")
Add to bootstrap.php
Kohana::modules(array( ... 'hauthlite' => MODPATH.'hauthlite', // Configurable user authentication ... ));
Init in yours modules for instances
` private function tryLogin() { $response = array(); $user = Hauthlite::instance()->login($username, $password); if ($user) { Request::instance()->redirect('/my/correct/controller'); } else { $response[] = "Invalid user name or password."; } return $response; }
public function before() { // Run anything that need ot run before this. parent::before(); $user = Hauthlite::instance()->logged_in(); if ($user) { Request::instance()->redirect('/user/logged/in'); } } `
Init the module in where do you need!
// $user = Hauthlite::instance()->logged_in();
Visit huexotzinca lab
Read the license