Changeset 3114 for trunk/modules/auth

Show
Ignore:
Timestamp:
07/15/2008 04:11:44 PM (5 months ago)
Author:
Geert
Message:

Added an extremely lightweight File Auth driver. Supply the usernames and passwords in the config file and you are ready to go. Roles and auto-login are not supported. If you need one of those features, you should not pick the File Auth driver anyway.

Location:
trunk/modules/auth
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/auth/config/auth.php

    r2471 r3114  
    3434 */ 
    3535$config['lifetime'] = 1209600; 
     36 
     37/** 
     38 * Usernames (keys) and hashed passwords (values) used by the File driver. 
     39 */ 
     40$config['users'] = array 
     41( 
     42        // 'admin' => '4ccd0e25c2a7ffefd4b92ecbbd4781752920145f826a881073', 
     43); 
  • trunk/modules/auth/libraries/Auth.php

    r2593 r3114  
    149149         * based on the configured salt pattern. 
    150150         * 
    151          * Parameters: 
    152          *  password - plaintext password 
    153          * 
    154          * Returns: 
    155          *  Hashed password string 
     151         * @param   string  plaintext password 
     152         * @return  string  hashed password string 
    156153         */ 
    157154        public function hash_password($password, $salt = FALSE) 
    158155        { 
    159                 if ($salt == FALSE) 
     156                if ($salt === FALSE) 
    160157                { 
    161158                        // Create a salt seed, same length as the number of offsets in the pattern 
  • trunk/modules/auth/libraries/drivers/Auth.php

    r2482 r3114  
    4040         * Log a user out. 
    4141         * 
    42          * @param   boolean   complete destroy the session 
     42         * @param   boolean  completely destroy the session 
    4343         * @return  boolean 
    4444         */ 
     
    4848         * Checks if a session is active. 
    4949         * 
    50          * @param   string    role name 
     50         * @param   string   role name 
    5151         * @return  boolean 
    5252         */ 
  • trunk/modules/auth/libraries/drivers/Auth/ORM.php

    r3101 r3114  
    193193        } 
    194194 
    195 } // End Auth_Orm_Driver Class 
     195} // End Auth_ORM_Driver Class