Commit 40c65cb6 authored by Jacob Priddy's avatar Jacob Priddy 👌
Browse files

Merge branch '11-make-microcontroller-authenticate-to-api' into 'master'

Resolve "make microcontroller authenticate to API"

Closes #11

See merge request kretschmar/doorcode!23
parents ba25b3a2 066e9722
Pipeline #2893 failed with stages
in 1 minute and 28 seconds
......@@ -3,5 +3,7 @@
#define DOOR_WIFI_SSID "ssid"
#define DOOR_WIFI_PASSWORD "password"
#define API_TOKEN "api token"
#define API_BASE_URL "https://doorcode:port/api"
#endif //DOOR_CONFIG_H
......@@ -61,7 +61,7 @@ static void http_task(void* pvParameters)
ESP_LOGI(TAG, "Connected to AP, begin connecting to DoorCode API");
esp_http_client_config_t config = {
.url = "https://192.168.2.1:8080/api",
.url = API_BASE_URL "/door?api_token=" API_TOKEN,
.event_handler = _http_event_handler,
// .cert_pem = doorcode_root_cert_pem_start,
.skip_cert_common_name_check = true,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment