eopenid EOpenID implements the OpenID protocol.

  1. Introduction
  2. Documentation
  3. License
  4. Change Log

Introduction

EOpenID class extends from CBaseUserIdentity and implements the OpenID protocol to authenticate a user. Based on Mewp's LightOpenID class.

Note: Please post the issues on Github

Download

Download Last release

Resources

Documentation

Requirements
  • Yii 1.0 or above
Installation
  • Extract the release file under protected/components
Usage

The action:

public function actionOpenIDLogin() {
        $openid=new EOpenID;

        if(!isset($_GET['openid_mode'])) {
            if(isset($_POST['openid_identifier'])) {
                $openid->authenticate($_POST['openid_identifier']);
            }
        }
        elseif(isset($_GET['openid_mode'])) {
            $openid->validate();
            Yii::app()->user->login($openid);
        }

        $this->render('openIDLogin',array('openid'=>$openid));
    }

The view:

<div class="form">
<?php echo CHtml::beginForm(); ?>

	<div class="row">
		<?php echo CHtml::label('Identifier:', 'openid_identifier'); ?>
		<?php echo CHtml::textField('openid_identifier', '', array('size'=>40)); ?>
		<p class="hint">
			Hint: You may login with <tt>https://www.google.com/accounts/o8/id</tt>.
		</p>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Login'); ?>
	</div>

<?php echo CHtml::endForm(); ?>
</div><!-- form -->

License

Some time ago I developed this extension for InDaHouseRulez SL. I no longer work there, but I still support the extension.

The extension was released under the MIT license, so I made a fork on GitHub, where you'll find the latest version:

https://github.com/jorgebg/yii-eopenid

Change Log

November 2, 2010
  • Updated to new LightOpenID version 0.3 (thanks hightman)
July 27, 2010
  • Initial release.
July 28, 2010
  • Renamed as EOpenID.
  • PHP5 object constructor.
8 0
10 followers
694 downloads
Yii Version: 1.1
License: MIT
Category: Auth
Tags: openid
Developed by: CGeorge
Created on: Jul 27, 2010
Last updated: 10 years ago

Related Extensions