2017 © Pedro PelĂĄez
 

library yii-eoauth

Yii Framework Extension. EOAuthUserIdentity class implements IUserIdentity Yii interface and the OAuth protocol to authenticate a user. Based on Google's software.

image

krupni/yii-eoauth

Yii Framework Extension. EOAuthUserIdentity class implements IUserIdentity Yii interface and the OAuth protocol to authenticate a user. Based on Google's software.

  • Thursday, May 24, 2018
  • by krupni
  • Repository
  • 1 Watchers
  • 1 Stars
  • 882 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 1236 % Grown

The README.md

This repository is restored itmages/yii-eoauth, (*1)

Install package, (*2)

composer require krupni/yii-eoauth, (*3)

Introduction

EOAuthUserIdentity class implements IUserIdentity Yii interface and the OAuth protocol to authenticate a user., (*4)

Based on Google's software., (*5)

Flattr this git repo, (*6)

Resources

Documentation

Requirements

  • Yii 1.0 or above

Installation

  • Extract the release file under protected/extensions/eoauth

Usage

Use this sample actions for login/logout with Google:, (*7)


public function actionLogin() { Yii::import('ext.eoauth.*'); $ui = new EOAuthUserIdentity( array( //Set the "scope" to the service you want to use 'scope'=>'https://sandbox.google.com/apis/ads/publisher/', 'provider'=>array( 'request'=>'https://www.google.com/accounts/OAuthGetRequestToken', 'authorize'=>'https://www.google.com/accounts/OAuthAuthorizeToken', 'access'=>'https://www.google.com/accounts/OAuthGetAccessToken', ) ) ); if ($ui->authenticate()) { $user=Yii::app()->user; $user->login($ui); $this->redirect($user->returnUrl); } else throw new CHttpException(401, $ui->error); } public function actionLogout() { Yii::app()->user->logout(); // Redirect to application home page. $this->redirect(Yii::app()->homeUrl); }

Set to load the extensions in the main.php (by DavidHHuan, thanx!), (*8)

'import'=>array(
    'application.models.*',
    'application.components.*',
        'ext.eoauth.*',
        'ext.eoauth.lib.*',
),

License

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

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

https://github.com/jorgebg/yii-eoauth, (*11)

The Versions

24/05 2018

dev-master

9999999-dev http://www.yiiframework.com/extension/eoauth/

Yii Framework Extension. EOAuthUserIdentity class implements IUserIdentity Yii interface and the OAuth protocol to authenticate a user. Based on Google's software.

  Sources   Download

MIT

by Jorge Barata GonzĂĄlez

24/05 2018

1.0.0

1.0.0.0 http://www.yiiframework.com/extension/eoauth/

Yii Framework Extension. EOAuthUserIdentity class implements IUserIdentity Yii interface and the OAuth protocol to authenticate a user. Based on Google's software.

  Sources   Download

MIT

by Jorge Barata GonzĂĄlez