User Guide | flexi auth concept

The principle ideas of how flexi auth works and how to use its 'flexible' features.

The flexi auth Concept

The purpose of the flexi auth library is to offer modularised user authentication features, that allow a developer to pick and choose which features they require, without having to include features that are surplus to the clients requirements.

flexi auth is flexible enough to be used to create simple login-logout authentication, up to authentication systems with features including user groups and privileges, account activation, forgotten passwords etc. The tools are provided, you just have to put them together.

What flexi auth is not, is an all-in-one out-of-the-box login solution, you still need to build the structure of the site, flexi auth just adds the user authentication functionality to that structure. If you build the house, it will validate who comes in and out.

Library File Structure

The complete flexi auth library is controlled via several files, a config file, 2 library files, 2 model files, an extension to CI's form validation library, a reCaptcha helper and multiple language files. The library also uses the PHPASS library to manage passwords.

  • The config file as you would expect controls the entire configuration of flexi auth, defining auth session names, database tables and auth behaviour settings.
  • The library and model files are separated into 2 operational tasks, offering a 'lite' and 'standard' set of tools.
    • The 'lite' library typically reads data from the cart session or database. It is not used to save data.
    • The 'standard' library does the heavy work, managing SQL CRUD functionality of users, user groups and privileges, plus much more.
    Read the library documentation for further information on flexi auths library files.
  • The extension of CI's validation library includes functions to help validate passwords and captchas. It also includes functions to lookup whether user identities are available when users create an account.
  • A helper file is included to enable the use of Googles reCaptcha tool.
  • The language files are used to translate cart status and error messages based on a users location.
  • The PHPASS library is also included to securely manage user passwords.