Yii Framework Forum: EOpenID and LightOpenID 0.3? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

EOpenID and LightOpenID 0.3? Rate Topic: -----

#1 User is offline   Westves 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 18-August 10
  • Location:Kiev, Ukraine

Posted 28 October 2010 - 06:13 AM

Hi.

I'm just wondering if somebody can update EOpenID to new LightOpenID version 0.3 (Oct 19, 2010), which "removes dependency on curl in favor of php streams, and fixes some bugs".

Thanks a lot.
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,788
  • Joined: 17-January 09
  • Location:Russia

Posted 28 October 2010 - 04:55 PM

You should contact extension author directly, I think. His forum id is listed in the right column at extension page: http://www.yiiframew...ension/eopenid/
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#3 User is offline   hightman 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 45
  • Joined: 23-August 09

Posted 29 October 2010 - 02:09 AM

hi, You can use this piece of code to replace the original request () method:
	protected function request($url, $method='GET', $params=array()) {
		$method = strtoupper($method);
		$query = http_build_query($params, '', '&');
		$option = array('method' => $method, 'max_redirects' => 5,
			'timeout' => 5, 'ignore_errors' => true);
		if ($method == 'POST')
			$option['content'] = $query;
		else {
			$url .= ( strpos($url, '?') ? '&' : '?') . $query;
			if ($method != 'HEAD')
				$option['method'] = 'GET';
		}
		$context = stream_context_create(array('http' => $option));
		$body = @file_get_contents($url, false, $context);
		$head = implode("\r\n", $http_response_header);
		return $head . "\r\n\r\n" . $body;
	}

I have uploaded my full version of LightOpenid as attachment file.

Attached File(s)


0

#4 User is offline   Westves 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 18-August 10
  • Location:Kiev, Ukraine

Posted 29 October 2010 - 12:58 PM

View Posthightman, on 29 October 2010 - 02:09 AM, said:

hi, You can use this piece of code to replace the original request () method:
...
I have uploaded my full version of LightOpenid as attachment file.


Hi.

Thank you.
0

#5 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,450
  • Joined: 04-October 10

Posted 29 October 2010 - 02:16 PM

Thanks man
┬┐How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#6 User is offline   CGeorge 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 27-May 10
  • Location:Spain

Posted 02 November 2010 - 03:49 AM

Thank you all! Updated
0

#7 User is offline   moisty70 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 58
  • Joined: 23-December 09

Posted 08 November 2010 - 08:10 AM

View PostCGeorge, on 02 November 2010 - 03:49 AM, said:

Thank you all! Updated


Then I should not get this error

Descripci├│n

Curl extension is required.
Archivo Fuente:

D:\MOI\sp\website\protected\components\EOpenID.php(101)

00089:     	'contact/postalCode/home' => 'postcode',
00090:     	'contact/country/home'    => 'country',
00091:     	'pref/language'       	=> 'language',
00092:     	'pref/timezone'       	=> 'timezone',
00093:     	);
00094: 
00095: 	function __construct()
00096: 	{
00097:     	$this->trustRoot = ($_SERVER['HTTPS']=='on' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'];
00098:     	$this->returnUrl = $this->trustRoot . $_SERVER['REQUEST_URI'];
00099: 
00100:     	if (!function_exists('curl_exec')) {
00101: throw new ErrorException('Curl extension is required.'); 


Am I wrong?
0

#8 User is offline   kusanagi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 57
  • Joined: 06-December 10

Posted 07 December 2010 - 04:31 AM

i try to use this library, but got errors
first i got error "Undefined index: HTTPS" on line
$this->trustRoot = ($_SERVER['HTTPS']=='on' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'];
so i changed
$this->trustRoot = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'];


then i got error

Quote

PHP Error
Description

Trying to get property of non-object
Source File

/home/konst/NetBeansProjects/test_blog/protected/components/EOpenID.php(141)

00129:
00130:
00131: public function getIsAuthenticated(){
00132: return $this->isAuthenticated;
00133: }
00134:
00135: public function getName(){
00136: $info=$this->attributes;
00137: //if (count($info) == 0) return null;
00138: var_dump($info);
00139:
00140: foreach(array('nickname','email','fullname') as $attribute)
00141: if ($info->$attribute)
00142: return $info->$attribute;
00143:
00144: }
00145:
00146: public function getIdentity() {
00147: # We return claimed_id instead of identity,
00148: # because the developer should see the claimed identifier,
00149: # i.e. what he set as identity, not the op-local identifier (which is what we verify)
00150: return $this->claimed_id;
00151: }
00152:
00153: public function getId(){

Stack Trace

#0 /home/konst/NetBeansProjects/yii/framework/web/auth/CWebUser.php(193): EOpenID->getName()
#1 /home/konst/NetBeansProjects/test_blog/protected/controllers/SiteController.php(154): CWebUser->login()
#2 /home/konst/NetBeansProjects/yii/framework/web/actions/CInlineAction.php(57): SiteController->actionOpenIDLogin()
#3 /home/konst/NetBeansProjects/yii/framework/web/CController.php(300): CInlineAction->run()
#4 /home/konst/NetBeansProjects/yii/framework/web/CController.php(278): SiteController->runAction()
#5 /home/konst/NetBeansProjects/yii/framework/web/CController.php(257): SiteController->runActionWithFilters()
#6 /home/konst/NetBeansProjects/yii/framework/web/CWebApplication.php(324): SiteController->run()
#7 /home/konst/NetBeansProjects/yii/framework/web/CWebApplication.php(121): CWebApplication->runController()
#8 /home/konst/NetBeansProjects/yii/framework/base/CApplication.php(135): CWebApplication->processRequest()
#9 /home/konst/NetBeansProjects/test_blog/index.php(13): CWebApplication->run()

2010-12-07 11:25:41 Apache/2.2.14 (Ubuntu) Yii Framework/1.1.5


i changed code
if ($info->$attribute)
                    return $info->$attribute;

to
if (isset($info[$attribute]))
                    return $info[$attribute];



i see that errors getting only me, i use sample code http://www.yiiframew...on/eopenid/#hh4
why i get errors?
0

#9 User is offline   micz 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 31
  • Joined: 05-June 09

Posted 13 February 2011 - 12:05 PM

I used your example code and I get exception No server found :(.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users