Giter Site home page Giter Site logo

codeigniter-easyauth's Introduction

Codeigniter-Easyauth

Very basic and "need-to-know" authentication package.

This package is very basic and focuses on 1 thing only: authentication

Easyauth is very configurable.

For a secure solution of handling sessions you may want to give [codeigniter-native-session][1] a go. It handles sessions server-side instead of cookies

How to use:

  • Run the SQL file (it is in the folder 'sql')
  • Copy config/easyauth.php to application/config/easyauth.php
  • Copy libraries/easyauth.php to application/libraries/easyauth.php
  • Copy controllers/Auth.php to application/controllers/Auth.php
  • Copy views/auth to application/views/auth

Thats it. (you can login with: [email protected] and password)

Installation

  • Copy "codeigniter-easyauth" folder in third party
  • Copy "codeigniter-easyauth/controllers/Auth.php" to your controllers directory
  • $this->load->add_package_path(APPPATH.'third_party/codeigniter-easyauth');
  • Paste the following section to your routes.php config file:
$route['login'] = 'auth/login';
$route['logout'] = 'auth/logout';
$route['register'] = 'auth/register';
$route['forgot-password'] = 'auth/forgot_password';
$route['reset-password/(:any)'] = 'auth/reset_password/$1';
$route['impersonate/(:any)'] = 'auth/impersonate/$1';
$route['unimpersonate'] = 'auth/unimpersonate';

note

It isn't mandatory that you call your database table 'users' you can change that if you like.

Current functionality

(examples below are based on controller name auth e.g. http://localhost/cidev/auth/login etc.)

  • /login
  • /logout
  • /register
  • /forgot-password
  • /reset-password/[CODE]
  • /impersonate/[USER-ID]
  • /unimpersonate

The reset link is only available if a user 'lost' his password. He will be receive an email with a link (reset-password/[CODE]) with a unique hash

Goal

The goal of codeigniter-easyauth is keeping everything as simple and clean as possible.

codeigniter-easyauth's People

Contributors

atomicon avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

danielbeeke

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.