Permalink
Browse files

add Y! and google openid adapters as additional providers

  • Loading branch information...
1 parent 8f4cda8 commit d59222bdf94c0dbed731eeda91aad4faf7bf461a hybridauth committed Apr 3, 2012
@@ -0,0 +1,31 @@
+<?php
+/*!
+* HybridAuth
+* http://hybridauth.sourceforge.net | http://github.com/hybridauth/hybridauth
+* (c) 2009-2012, HybridAuth authors | http://hybridauth.sourceforge.net/licenses.html
+*/
+
+/**
+ * Hybrid_Providers_Google OpenID based
+ *
+ * Provided as a way to keep backward compatibility for Google OpenID based on HybridAuth <= 2.0.8
+ *
+ * http://hybridauth.sourceforge.net/userguide/IDProvider_info_Google.html
+ */
+class Hybrid_Providers_Google extends Hybrid_Provider_Model_OpenID
+{
+ var $openidIdentifier = "https://www.google.com/accounts/o8/id";
+
+ /**
+ * finish login step
+ */
+ function loginFinish()
+ {
+ parent::loginFinish();
+
+ $this->user->profile->emailVerified = $this->user->profile->email;
+
+ // restore the user profile
+ Hybrid_Auth::storage()->set( "hauth_session.{$this->providerId}.user", $this->user );
+ }
+}
@@ -0,0 +1,31 @@
+<?php
+/*!
+* HybridAuth
+* http://hybridauth.sourceforge.net | http://github.com/hybridauth/hybridauth
+* (c) 2009-2012, HybridAuth authors | http://hybridauth.sourceforge.net/licenses.html
+*/
+
+/**
+ * Hybrid_Providers_Yahoo OpenID based
+ *
+ * Provided as a way to keep backward compatibility for Yahoo OpenID based on HybridAuth <= 2.1.0
+ *
+ * http://hybridauth.sourceforge.net/userguide/IDProvider_info_Yahoo.html
+ */
+class Hybrid_Providers_Yahoo extends Hybrid_Provider_Model_OpenID
+{
+ var $openidIdentifier = "https://open.login.yahooapis.com/openid20/www.yahoo.com/xrds";
+
+ /**
+ * finish login step
+ */
+ function loginFinish()
+ {
+ parent::loginFinish();
+
+ $this->user->profile->emailVerified = $this->user->profile->email;
+
+ // restore the user profile
+ Hybrid_Auth::storage()->set( "hauth_session.{$this->providerId}.user", $this->user );
+ }
+}

0 comments on commit d59222b

Please sign in to comment.