background preloader

Kohana v3.1+

Facebook Twitter

Kohana 3: AUTH, A2 & ACL. Some time ago I wrote a blog entry a modified demo of Wouter’s ACL & A2 using the AUTH module.

Kohana 3: AUTH, A2 & ACL

At that time I used Kohana 2.3.4. Now, this entry is to explain was needs to be changed to use the AUTH module instead of the A1 module for the demo of Wouter for the Kohana 3 release. At the same time, it can help you to understand what needs to be changed if you want to provide your own authentication module. The original announcement of Wouter’s module can be find at this Kohana forum discussion. Keep reading for the explanation or go directly to the demo. Step 1 You need to install configure your KO3 application:application/bootstrap.php Notice that A2ACLdemo is placed before the auth module, this is important to apply the right priorities for the Kohana cascading filesystem. Step 2 Setup your configuration files properly. Step 3 Download my demo. Step 4 The files in the module are as follow: Step 5 Now, let’s explain each modified file starting by the configuration file (a2-demo)

Pogopixels - Web application and widget developer. The documentation about the Auth module in Kohana 3.1 is severely lacking, and the module has changed sufficiently that existing tutorials and documentations are no longer relevant. So below is a quick tutorial on how to setup and use the module: 1) Enable the modules If not done already, enable the needed modules in bootstrap.php. In particular, auth, database and ORM need to be enabled: <? 2) Setup the database - Copy the configuration file from modules/database/config/database.php to application/config/database.php - Open it and set username, password, etc. - Create the database schema using the SQL file in modules/orm/auth-schema-mysql.sql You should now have a working database with all the required tables. 3) Setup the Auth module - Copy the Auth config file from modules\auth\config\auth.php to your config folder in application/config. - Open this file and change the driver to “ORM” and set a hash key.

<? In order for the Auth module to work, you must also set the cookie salt variable. <? <? Kohana User Guide. The following modules have userguide pages: Kohana - Documentation for Kohana core/system.

Kohana User Guide

Auth - User authentication and authorization. Cache - Common interface for caching engines. Codebench - Code benchmarking tool. Database - Database agnostic querying and result management. Image - Image manipulation. ORM - Official ORM module, a modeling library for object relational mapping. Userguide - Documentation viewer and api generation. Kohana Framework. PHP » Ygam Retuta. Work in progress » kohana 3.2 tutorial. Below you will find an article / tutorial on Kohana 3.2 – An elegant HMVC PHP5 framework that provides a rich set of components for building web applications.

work in progress » kohana 3.2 tutorial

I am sharing a site template that use authentication & internationalization. You can view the website (not much to see) and download it from github. Any pull request will be more than welcome! Download via Github: Topics Install Using GIT: or Download: Structure of folders:www/yoursite/site/index.php & .htaccess-> and your assets (css, images, js)www/yoursite/application-> the very core of your sitewww/yoursite/module & system-> core of kohana or:www/kohana/version/system & module-> multiple site using kohana or: everything in www/yoursite/site (application, module, system, index.php, .htaccess, …) Test: 127.0.0.1/ If it’s greenish, then remove install.php index.php Reflect this structure in www/yoursite/site/index.php: bootstrap.php Modify application/bootstrap.php Set PRODUCTION vs DEVELOPMENT Initialize Kohana Many modules are available: