include CSRF-token in auth and drop 'modern' prefix in paths (#72)

This fix is needed to address internal changes in the Garmin API, where service
endpoints that previously worked started returning 402 responses. Appears like
dropping the `modern` prefix from the endpoint paths fixes the issue.

Also, the authentication sequence has been updated to include a CSRF (Cross-Site
Request Forgery) token to closer mimic the behavior of the login sequence on the
official web page.

Co-authored-by: kfollesdal <kristoffer.follesdal@bkk.no>
This commit is contained in:
Peter Gardfjäll
2021-02-25 11:19:51 +01:00
committed by GitHub
co-authored by kfollesdal
parent 3886c314c9
commit b62e2ac1e5
3 changed files with 80 additions and 108 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ url = "https://pypi.org/simple"
verify_ssl = true
[packages]
"garminexport" = {path = ".", editable = true}
garminexport = {path = ".",editable = true}
requests = ">=2.0,<3"
python-dateutil = ">=2.0,<3"