From d23423b5c60f1b3fa02b689f73feb8281d8b4a76 Mon Sep 17 00:00:00 2001 From: "Mike P. Sinn" Date: Tue, 15 Oct 2019 15:08:22 -0500 Subject: [PATCH 1/3] Strava changed "public" scope to "read" --- src/OAuth/OAuth2/Service/Strava.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OAuth/OAuth2/Service/Strava.php b/src/OAuth/OAuth2/Service/Strava.php index 208ec635..83da5654 100644 --- a/src/OAuth/OAuth2/Service/Strava.php +++ b/src/OAuth/OAuth2/Service/Strava.php @@ -33,7 +33,7 @@ class Strava extends AbstractService * Scopes */ // default - const SCOPE_PUBLIC = 'public'; + const SCOPE_READ = 'read'; // Modify activities, upload on the user’s behalf const SCOPE_WRITE = 'write'; // View private activities and data within privacy zones @@ -49,7 +49,7 @@ public function __construct( UriInterface $baseApiUri = null ) { if (empty($scopes)) { - $scopes = array(self::SCOPE_PUBLIC); + $scopes = array(self::SCOPE_READ); } parent::__construct( From d890e4cdcaf3474a5c60ac55f53f99645255f355 Mon Sep 17 00:00:00 2001 From: "Mike P. Sinn" Date: Wed, 19 Feb 2020 15:27:34 -0600 Subject: [PATCH 2/3] Linkedin oauth/v2 --- src/OAuth/OAuth2/Service/Linkedin.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/OAuth/OAuth2/Service/Linkedin.php b/src/OAuth/OAuth2/Service/Linkedin.php index 65cfd946..071466e8 100644 --- a/src/OAuth/OAuth2/Service/Linkedin.php +++ b/src/OAuth/OAuth2/Service/Linkedin.php @@ -20,9 +20,10 @@ class Linkedin extends AbstractService { /** * Defined scopes - * @link http://developer.linkedin.com/documents/authentication#granting + * + * @link https://docs.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow?context=linkedin/context */ - const SCOPE_R_BASICPROFILE = 'r_basicprofile'; + const SCOPE_R_LITEPROFILE = 'r_liteprofile'; const SCOPE_R_FULLPROFILE = 'r_fullprofile'; const SCOPE_R_EMAILADDRESS = 'r_emailaddress'; const SCOPE_R_NETWORK = 'r_network'; @@ -31,7 +32,7 @@ class Linkedin extends AbstractService const SCOPE_RW_COMPANY_ADMIN = 'rw_company_admin'; const SCOPE_RW_GROUPS = 'rw_groups'; const SCOPE_W_MESSAGES = 'w_messages'; - const SCOPE_W_SHARE = 'w_share'; + const SCOPE_W_MEMBER_SOCIAL = 'w_member_social'; public function __construct( CredentialsInterface $credentials, @@ -40,10 +41,14 @@ public function __construct( $scopes = array(), UriInterface $baseApiUri = null ) { + if (count($scopes) === 0) { + $scopes = array(self::SCOPE_R_LITEPROFILE, self::SCOPE_R_EMAILADDRESS); + } + parent::__construct($credentials, $httpClient, $storage, $scopes, $baseApiUri, true); if (null === $baseApiUri) { - $this->baseApiUri = new Uri('https://api.linkedin.com/v1/'); + $this->baseApiUri = new Uri('https://api.linkedin.com/v2/'); } } @@ -52,7 +57,7 @@ public function __construct( */ public function getAuthorizationEndpoint() { - return new Uri('https://www.linkedin.com/uas/oauth2/authorization'); + return new Uri('https://www.linkedin.com/oauth/v2/authorization'); } /** @@ -60,7 +65,7 @@ public function getAuthorizationEndpoint() */ public function getAccessTokenEndpoint() { - return new Uri('https://www.linkedin.com/uas/oauth2/accessToken'); + return new Uri('https://www.linkedin.com/oauth/v2/accessToken'); } /** From dec5bc4f6db3b45b2e3d80a4f2ef9ad39488bd79 Mon Sep 17 00:00:00 2001 From: "Mike P. Sinn" Date: Wed, 19 Feb 2020 15:29:33 -0600 Subject: [PATCH 3/3] Update Netatmo.php --- src/OAuth/OAuth2/Service/Netatmo.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/OAuth/OAuth2/Service/Netatmo.php b/src/OAuth/OAuth2/Service/Netatmo.php index eb5c68d9..65e954dd 100644 --- a/src/OAuth/OAuth2/Service/Netatmo.php +++ b/src/OAuth/OAuth2/Service/Netatmo.php @@ -36,6 +36,18 @@ class Netatmo extends AbstractService const SCOPE_THERMOSTAT_READ = 'read_thermostat'; // Used to configure the thermostat (syncschedule, setthermpoint) const SCOPE_THERMOSTAT_WRITE = 'write_thermostat'; + // Used to retrieve Welcome data (Gethomedata, Getcamerapicture) + const SCOPE_READ_CAMERA = 'read_camera'; + // Used to tell Welcome a specific person or everybody has left the Home (Setpersonsaway) + const SCOPE_WRITE_CAMERA = 'write_camera'; + // Used to access the camera, the videos and the live stream. + const SCOPE_ACCESS_CAMERA = 'access_camera'; + // Used to retrieve Presence data (Gethomedata, Getcamerapicture) + const SCOPE_READ_PRESENCE = 'read_presence'; + // Used to access the camera, the videos and the live stream. + const SCOPE_ACCESS_PRESENCE = 'access_presence'; + // Used to read data coming from Healthy Home Coach (gethomecoachsdata). + const SCOPE_READ_HOMECOACH = 'read_homecoach'; public function __construct( CredentialsInterface $credentials,