Yii 1.1: simple-http-authentication

Simple Http Authentication
2 followers

This extension is a simple http authentication system. It works as a filter in your controllers and you supply username/password pairs to allow users execute the actions. It makes for easy administration sections etc. nothing too fancy. It doesn't use Digest, that might be something for the future.

Resources

Documentation

Requirements

  • Yii 1.0.2 or above

Installation

  • Place the HttpAuthFilter.php under protected/components

Usage

See the following code example:

public function filters()
    {
        return array(
            array(
            'HttpAuthFilter',
            'users'=>array('admin'=>'admin'),
            'realm'=>'Admin section'
 
                  )  
            );
    }

Change Log

March 14, 2009

  • Initial release.

Total 1 comment

#1301 report it
Angel De La Noche at 2009/09/23 08:49pm
Security bug

$this->users[$username] == $password should be $this->users[$username] === $password or user will be able to log in by supplying any login and empty password. undef == ''.

Leave a comment

Please to leave your comment.

Create extension
  • Yii Version: 1.1
  • License: New BSD License
  • Developed by: dalip
  • Category: Auth
  • Votes: +3
  • Downloaded: 1,052 times
  • Created on: Mar 14, 2009
  • Last updated: never