Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Authorization library for ColdFusion on Wheels
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
templates
.htaccess
KeylessEntry.cfc
README.textile
index.cfm

README.textile

Keyless Entry

This plugin will generate common user authentication code for your CFWheels application.

Current Features

  • Generates basic controllers, models and views to get up and running quickly.
  • Provides basic user authentication.
  • Provides a sign-up form to allow new user creation.
  • Adds methods to your Wheels app to set as filters to require login, etc.
  • Hashes passwords so they are not visible in the database

Instructions

  1. Create the db tables
  2. Generate the code
  3. Add these to your routes file

    <cfset addRoute(name="login", pattern="login", controller="sessions", action="new")> <cfset addRoute(name="logout", pattern="logout", controller="sessions", action="destroy")> <cfset addRoute(name="signup", pattern="signup", controller="users", action="new")> <cfset addRoute(name="activate", pattern="activation/[activationCode]", controller="activations", action="activate")>
  4. Filters can be added to controllers, etc.
  5. Create users table with the following SQL
CREATE TABLE `users` (
  `id` int(11) NOT NULL auto_increment,
  `accountID` int(11) default NULL,
  `username` varchar(20) collate latin1_general_ci NOT NULL default '',
  `password` varchar(255) collate latin1_general_ci NOT NULL default '',
  `email` varchar(100) collate latin1_general_ci NOT NULL default '',
  `firstName` varchar(50) collate latin1_general_ci NOT NULL default '',
  `lastName` varchar(50) collate latin1_general_ci default NULL,
  `isAdmin` tinyint(1) default '0',
  `activationCode` varchar(35) collate latin1_general_ci default NULL,
  `activatedAt` datetime default NULL,
  `lastLogin` int(11) default NULL,
  `createdAt` datetime default NULL,
  `updatedAt` datetime default NULL,
  PRIMARY KEY  (`id`)
) 

TODO

  • Move password encryption to plugin file
Something went wrong with that request. Please try again.