1
0
mirror of https://github.com/beestat/app.git synced 2025-06-02 21:26:38 -04:00

Fixed #269 - Authorization Failures

Ecobee also switched me over to the new JWT flow.
This commit is contained in:
Jon Ziebell 2020-07-01 08:06:01 -04:00
parent 70e55a5f3c
commit b34d84ee9d

View File

@ -72,6 +72,7 @@ class ecobee_token extends cora\crud {
'deleted' => false 'deleted' => false
] ]
); );
if(count($ecobee_tokens) === 0) { if(count($ecobee_tokens) === 0) {
throw new cora\exception('Could not refresh ecobee token; no token found.', 10001); throw new cora\exception('Could not refresh ecobee token; no token found.', 10001);
} }
@ -84,6 +85,7 @@ class ecobee_token extends cora\crud {
'method' => 'POST', 'method' => 'POST',
'endpoint' => 'token', 'endpoint' => 'token',
'arguments' => [ 'arguments' => [
'ecobee_type' => 'jwt',
'grant_type' => 'refresh_token', 'grant_type' => 'refresh_token',
'refresh_token' => $ecobee_token['refresh_token'] 'refresh_token' => $ecobee_token['refresh_token']
] ]