Commit Graph

47 Commits

Author SHA1 Message Date
jlestel
b900a98d08 feat: Respect Retry-After header on 429 response code (#3943)
* Respect 429 response code instructions

* format

* up

* up

---------

Co-authored-by: Julien <julien@citio.digital>
2024-06-07 10:10:35 +02:00
Adrian Kumpf
0d6e288c70 Encrypt API tokens (#2360)
Store API tokens encrypted in the database.

During the database migration a randomly generated key will be used encrypt the tokens if no ENCRYPTION_KEY environment variable was provided.

If the application is started without the presence of an ENCRYPTION_KEY (or if the key failed to decrypt the existing tokens), the UI will display a warning with further instructions.
2022-02-18 17:03:13 +01:00
Adrian Kumpf
8aa772872a Remove support for logins with username/password 2022-01-21 19:09:32 +01:00
Adrian Kumpf
451b23634c Sign out if API repeatedly returns 401 response 2021-11-05 18:53:50 +01:00
Adrian Kumpf
0d92c9757b Reduce token refresh frequency 2021-10-01 11:45:43 +02:00
Adrian Kumpf
00ce5c39ce Use SSO Access Tokens 2021-09-30 13:45:02 +02:00
Adrian Kumpf
be76577d5b Enter captcha code in a separate view
Addresses #1836
2021-07-16 18:28:25 +02:00
Adrian Kumpf
1a90cdeadf Allow to sign in w/o captcha
Addresses #1658
2021-06-02 11:24:45 +02:00
Adrian Kumpf
e557152dfb Consolidate return types 2021-06-01 10:41:26 +02:00
Adrian Kumpf
827f5aa33d Support Tesla's captcha verification 2021-06-01 00:53:32 +02:00
Adrian Kumpf
8513d56b9f Allow to sign in with API tokens (#1450)
* Allow to sign in with API tokens

* Test signing in with API tokens

* Add button to go back to login with credentials

* Add note about how to get API tokens
2021-03-16 18:54:48 +01:00
Adrian Kumpf
a1e0628c1f Handle failed token refresh requests gracefully
Addresses #1369
2021-02-21 10:46:26 +01:00
Adrian Kumpf
b1991f541e Add support for v3 API tokens in China (#1300)
* Add support for v3 API tokens in China

* Add support for refreshing tokens in China

* Log auth requests without debug output

* Log failed requests to the Owner API
2021-02-06 17:28:29 +01:00
Adrian Kumpf
b9ef13addf Add sign-out button 2021-01-30 20:24:42 +01:00
Adrian Kumpf
3bb2d3086f Remove support for legacy auth 2021-01-30 18:06:13 +01:00
Adrian Kumpf
d825fc1723 Allow to use the legacy authentication API 2020-12-29 15:05:38 +01:00
Adrian Kumpf
bb7df800a5 Allow to enter MFA codes 2020-12-20 22:18:52 +01:00
Adrian Kumpf
4b23c8604e Upgrade to Elixir v1.11 2020-10-08 22:17:56 +02:00
Adrian Kumpf
c278aa207f Try to keep using tokens if initial refresh fails
Addresses #774
2020-06-04 09:52:31 +02:00
Adrian Kumpf
60631907ef Replace mojito with finch 2020-05-14 14:11:20 +02:00
Adrian Kumpf
a691784926 Use the Streaming API
Closes #417
2020-03-28 15:52:35 +01:00
Adrian Kumpf
0edc49944e Disable token refresh during development 2020-01-24 16:18:39 +01:00
Adrian Kumpf
9f05bc31fa Gracefully handle invalid authorization grants
Fixes #336
2020-01-03 21:25:10 +01:00
Adrian Kumpf
b725d3bdeb Refactor api module 2019-12-22 14:49:22 +01:00
Adrian Kumpf
af86426c55 Tweak timeouts 2019-12-16 19:54:14 +01:00
Adrian Kumpf
d301ac86f6 Include customized :tesla_api package 2019-12-15 15:36:26 +01:00
Adrian Kumpf
9d99c147e4 Translate timeouts 2019-12-07 15:39:03 +01:00
Adrian Kumpf
3a1dede5d2 Call /vehicle_data for vehicles that are online
... when retrieving list of all vehicles
2019-12-07 12:58:01 +01:00
Adrian Kumpf
5e2995482c Slightly increase timeout value 2019-11-16 12:24:19 +01:00
Adrian Kumpf
0846a20122 Use Task.async/1 instead of custom implementation 2019-11-05 23:04:40 +01:00
Adrian Kumpf
0d33b04b48 Make api calls async 2019-11-05 21:38:08 +01:00
Adrian Kumpf
a96dedad11 Add "car in service" state
Resolves #217
2019-10-24 22:48:08 +02:00
Adrian Kumpf
8fa9cb7e1c Properly log unknown states and invalid payloads 2019-10-01 21:46:40 +02:00
Adrian Kumpf
a4007b207b Tweak error handling 2019-09-30 14:32:18 +02:00
Adrian Kumpf
8355a0bed2 Remove deprecated sign-in via env variables 2019-09-14 02:57:45 +02:00
Adrian Kumpf
08a5fa55e0 Only fetch positions whose latitude is within bounds 2019-09-03 17:00:57 +02:00
Adrian Kumpf
477b88acde Persists tokens after auto refresh 2019-08-01 20:01:44 +02:00
Adrian Kumpf
0fecc5eb7e Test TeslaMate.Api 2019-07-31 17:40:15 +02:00
Adrian Kumpf
7e5d62cbd8 Add sign in view 2019-07-31 17:40:15 +02:00
Adrian Kumpf
b6fd6d0d32 Persist API tokens 2019-07-31 17:40:15 +02:00
Adrian Kumpf
ee82b4f734 Add feature flags for MQTT and Logging 2019-07-21 17:06:57 +02:00
Adrian Kumpf
a008776cb8 Unwrap Error struct 2019-04-10 11:37:31 +02:00
Adrian Kumpf
d1783970f4 Log and handle errors when resuming / suspending 2019-04-09 22:24:49 +02:00
Adrian Kumpf
f5b9df4be3 Explicitly suspend / resume logging 2019-04-08 21:42:46 +02:00
Adrian Kumpf
40e2b1c3a4 Wait until vehicle wakes up 2019-04-08 18:25:30 +02:00
Adrian Kumpf
665865e380 Add wake_up & suspend calls 2019-04-08 15:46:58 +02:00
Adrian Kumpf
76208a456c Rename otp app 2019-04-07 13:42:51 +02:00