Alex Trofimov пре 10 година
родитељ
комит
83c50d4298

+ 1 - 1
plugins/OAuth/OAuth1/Service/AbstractService.php

@@ -216,7 +216,7 @@ abstract class AbstractService extends BaseAbstractService implements ServiceInt
         $signatureParams = (is_array($bodyParams)) ? array_merge($authParameters, $bodyParams) : $authParameters;
         $signatureParams = (is_array($bodyParams)) ? array_merge($authParameters, $bodyParams) : $authParameters;
         $authParameters['oauth_signature'] = $this->signature->getSignature($uri, $signatureParams, $method);
         $authParameters['oauth_signature'] = $this->signature->getSignature($uri, $signatureParams, $method);
 
 
-        if (isset($bodyParams['oauth_session_handle'])) {
+        if (is_array($bodyParams) && isset($bodyParams['oauth_session_handle'])) {
             $authParameters['oauth_session_handle'] = $bodyParams['oauth_session_handle'];
             $authParameters['oauth_session_handle'] = $bodyParams['oauth_session_handle'];
             unset($bodyParams['oauth_session_handle']);
             unset($bodyParams['oauth_session_handle']);
         }
         }

+ 9 - 1
plugins/OAuth/OAuth2/Service/Facebook.php

@@ -169,7 +169,7 @@ class Facebook extends AbstractService
 
 
         $token = new StdOAuth2Token();
         $token = new StdOAuth2Token();
         $token->setAccessToken($data['access_token']);
         $token->setAccessToken($data['access_token']);
-        
+
         if (isset($data['expires'])) {
         if (isset($data['expires'])) {
             $token->setLifeTime($data['expires']);
             $token->setLifeTime($data['expires']);
         }
         }
@@ -198,6 +198,14 @@ class Facebook extends AbstractService
         return new Uri($baseUrl . '?' . $query);
         return new Uri($baseUrl . '?' . $query);
     }
     }
 
 
+    /**
+     * {@inheritdoc}
+     */
+    protected function getApiVersionString()
+    {
+        return empty($this->apiVersion) ? '' : '/v' . $this->apiVersion;
+    }
+
     /**
     /**
      * {@inheritdoc}
      * {@inheritdoc}
      */
      */

+ 8 - 0
plugins/OAuth/OAuth2/Service/Google.php

@@ -118,6 +118,14 @@ class Google extends AbstractService
     // Android Publisher
     // Android Publisher
     const SCOPE_ANDROID_PUBLISHER           = 'https://www.googleapis.com/auth/androidpublisher';
     const SCOPE_ANDROID_PUBLISHER           = 'https://www.googleapis.com/auth/androidpublisher';
 
 
+    // Google Classroom
+    const SCOPE_CLASSROOM_COURSES           = 'https://www.googleapis.com/auth/classroom.courses';
+    const SCOPE_CLASSROOM_COURSES_READONLY  = 'https://www.googleapis.com/auth/classroom.courses.readonly';
+    const SCOPE_CLASSROOM_PROFILE_EMAILS    = 'https://www.googleapis.com/auth/classroom.profile.emails';
+    const SCOPE_CLASSROOM_PROFILE_PHOTOS    = 'https://www.googleapis.com/auth/classroom.profile.photos';
+    const SCOPE_CLASSROOM_ROSTERS           = 'https://www.googleapis.com/auth/classroom.rosters';
+    const SCOPE_CLASSROOM_ROSTERS_READONLY  = 'https://www.googleapis.com/auth/classroom.rosters.readonly';
+
     protected $accessType = 'online';
     protected $accessType = 'online';
 
 
     public function __construct(
     public function __construct(

+ 2 - 0
plugins/OAuth/OAuth2/Service/Instagram.php

@@ -17,9 +17,11 @@ class Instagram extends AbstractService
      * @link http://instagram.com/developer/authentication/#scope
      * @link http://instagram.com/developer/authentication/#scope
      */
      */
     const SCOPE_BASIC         = 'basic';
     const SCOPE_BASIC         = 'basic';
+    const SCOPE_PUBLIC_CONTENT = 'public_content';
     const SCOPE_COMMENTS      = 'comments';
     const SCOPE_COMMENTS      = 'comments';
     const SCOPE_RELATIONSHIPS = 'relationships';
     const SCOPE_RELATIONSHIPS = 'relationships';
     const SCOPE_LIKES         = 'likes';
     const SCOPE_LIKES         = 'likes';
+    const SCOPE_FOLLOWER_LIST = 'follower_list';
 
 
     public function __construct(
     public function __construct(
         CredentialsInterface $credentials,
         CredentialsInterface $credentials,