|
1 | 1 | /** |
2 | | - * Google Sheet Client, GAuthManager v1.0.1 |
| 2 | + * Google Sheet Client, GAuthManager v1.0.2 |
3 | 3 | * |
4 | 4 | * This library supports Espressif ESP8266, ESP32 and Raspberry Pi Pico MCUs. |
5 | 5 | * |
6 | | - * Created February 6, 2023 |
| 6 | + * Created March 5, 2023 |
7 | 7 | * |
8 | 8 | * The MIT License (MIT) |
9 | 9 | * Copyright (c) 2022 K. Suwatchai (Mobizt) |
|
30 | 30 | #ifndef GAUTH_MANAGER_CPP |
31 | 31 | #define GAUTH_MANAGER_CPP |
32 | 32 |
|
| 33 | +#include <Arduino.h> |
| 34 | +#include "mbfs/MB_MCU.h" |
33 | 35 | #include "GAuthManager.h" |
34 | 36 |
|
35 | 37 | GAuthManager::GAuthManager() |
@@ -185,7 +187,7 @@ time_t GAuthManager::getTime() |
185 | 187 | bool GAuthManager::setTime(time_t ts) |
186 | 188 | { |
187 | 189 |
|
188 | | -#if !defined(ESP_GOOGLE_SHEET_CLIENT_ENABLE_EXTERNAL_CLIENT) && (defined(ESP8266) || defined(ESP32) || defined(PICO_RP2040)) |
| 190 | +#if !defined(ESP_GOOGLE_SHEET_CLIENT_ENABLE_EXTERNAL_CLIENT) && (defined(ESP8266) || defined(ESP32) || defined(MB_ARDUINO_PICO)) |
189 | 191 |
|
190 | 192 | if (TimeHelper::setTimestamp(ts) == 0) |
191 | 193 | { |
@@ -428,7 +430,7 @@ void GAuthManager::tokenProcessingTask() |
428 | 430 | // flag set for valid time required |
429 | 431 | bool sslValidTime = false; |
430 | 432 |
|
431 | | -#if defined(ESP8266) || defined(PICO_RP2040) |
| 433 | +#if defined(ESP8266) || defined(MB_ARDUINO_PICO) |
432 | 434 | // valid time required for SSL handshake using server certificate in ESP8266 |
433 | 435 | if (config->cert.data != NULL || config->cert.file.length() > 0) |
434 | 436 | sslValidTime = true; |
@@ -872,7 +874,7 @@ bool GAuthManager::createJWT() |
872 | 874 | MemoryHelper::freeBuffer(mbfs, config->signer.hash); |
873 | 875 | return false; |
874 | 876 | } |
875 | | -#elif defined(ESP8266) || defined(PICO_RP2040) |
| 877 | +#elif defined(ESP8266) || defined(MB_ARDUINO_PICO) |
876 | 878 | config->signer.hash = MemoryHelper::createBuffer<char *>(mbfs, config->signer.hashSize); |
877 | 879 | br_sha256_context mc; |
878 | 880 | br_sha256_init(&mc); |
@@ -973,7 +975,7 @@ bool GAuthManager::createJWT() |
973 | 975 |
|
974 | 976 | if (ret != 0) |
975 | 977 | return false; |
976 | | -#elif defined(ESP8266) || defined(PICO_RP2040) |
| 978 | +#elif defined(ESP8266) || defined(MB_ARDUINO_PICO) |
977 | 979 | // RSA private key |
978 | 980 | BearSSL::PrivateKey *pk = nullptr; |
979 | 981 | Utils::idle(); |
|
0 commit comments