From 52c0da3f4621925ead2446669982ef32c42d8be8 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 7 Aug 2023 21:17:10 +0200 Subject: Traewelling: replace legacy password login with OAuth2 This is a breaking change insofar as that traewelling support is no longer provided automatically, but must be enabled by providing a traewelling.de application ID and secret in travelynx.conf. However, as traewelling.de password login is deprecated and wil soon be disabled, travelynx would break either way. So we might or might not see travelynx 2.0.0 in the next days. Automatic token refresh is still todo, but that was the case for password login as well. Closes #64 --- examples/travelynx.conf | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/travelynx.conf b/examples/travelynx.conf index c77e40f..f8eaac0 100644 --- a/examples/travelynx.conf +++ b/examples/travelynx.conf @@ -97,7 +97,31 @@ die("Changeme!"), ], + # optionally, users can link travelynx and traewelling accounts, and + # automatically synchronize check-ins. + # To do so, you need to create a travelynx application on + # . The application + # must be marked as "Confidential" and have a redirect URL that matches + # $base_url/oauth/traewelling, where $base_url refers to the URL configured + # above. For instance, travelynx.de uses + # 'https://travelynx.de/oauth/traewelling'. An incorrect redirect URL will + # cause OAuth2 to fail with unsupported_grant_type. + # + # Note that the travelynx/traewelling OAuth2 integration does not support + # travelynx installations that are reachable on multiple URLs at the + # moment -- linking a traewelling account is only possible when accessing + # travelynx via the base URL. traewelling => { + + # Uncomment the following block and insert the application ID and + # secret obtained from https://traewelling.de/settings/applications + # -> your application -> Edit. + + #oauth => { + # id => 1234, + # secret => 'mysecret', + #} + # By default, the "work" or "worker" command does not just update # real-time data of active journeys, but also performs push and pull # synchronization with traewelling for accounts that have configured it. @@ -110,7 +134,8 @@ # periodically runs "perl index.pl traewelling" (push and pull) or # two separate cronjobs that run "perl index.pl traewelling push" and # "perl index.pl traewelling pull", respectively. - ## separate_worker => 1, + + # separate_worker => 1, }, version => qx{git describe --dirty} // 'experimental', -- cgit v1.2.3