summaryrefslogtreecommitdiff
path: root/templates/account.html.ep
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-08-07 21:17:10 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-08-07 21:17:10 +0200
commit52c0da3f4621925ead2446669982ef32c42d8be8 (patch)
treee7040cf823cd74d74509367a2ffa46e5d1230623 /templates/account.html.ep
parent22627ce851f718df771e3c05d3298873be5f594e (diff)
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
Diffstat (limited to 'templates/account.html.ep')
-rw-r--r--templates/account.html.ep50
1 files changed, 26 insertions, 24 deletions
diff --git a/templates/account.html.ep b/templates/account.html.ep
index c27e0f5..b64869a 100644
--- a/templates/account.html.ep
+++ b/templates/account.html.ep
@@ -122,33 +122,35 @@
% }
</td>
</tr>
- <tr>
- <th scope="row">Träwelling</th>
- <td>
- <a href="/account/traewelling"><i class="material-icons">edit</i></a>
- % if (not ($traewelling->{token})) {
- <span style="color: #999999;">Nicht verknüpft</span>
- % }
- % elsif ($traewelling->{errored}) {
- Fehlerhaft <i class="material-icons" aria-hidden="true">error</i>
- % }
- % else {
- Verknüpft mit <%= $traewelling->{data}{user_name} // $traewelling->{email} %>
- % if ($traewelling->{expired}) {
- – Login-Token abgelaufen <i class="material-icons" aria-hidden="true">error</i>
- % }
- % elsif ($traewelling->{expiring}) {
- – Login-Token läuft bald ab <i class="material-icons" aria-hidden="true">warning</i>
+ % if (config->{traewelling}{oauth}) {
+ <tr>
+ <th scope="row">Träwelling</th>
+ <td>
+ <a href="/account/traewelling"><i class="material-icons">edit</i></a>
+ % if (not ($traewelling->{token})) {
+ <span style="color: #999999;">Nicht verknüpft</span>
% }
- % elsif ($traewelling->{pull_sync}) {
- – Checkins in Träwelling werden von travelynx übernommen
+ % elsif ($traewelling->{errored}) {
+ Fehlerhaft <i class="material-icons" aria-hidden="true">error</i>
% }
- % elsif ($traewelling->{push_sync}) {
- – Checkins in travelynx werden zu Träwelling weitergereicht
+ % else {
+ Verknüpft mit <%= $traewelling->{data}{user_name} // $traewelling->{email} %>
+ % if ($traewelling->{expired}) {
+ – Login-Token abgelaufen <i class="material-icons" aria-hidden="true">error</i>
+ % }
+ % elsif ($traewelling->{expiring}) {
+ – Login-Token läuft bald ab <i class="material-icons" aria-hidden="true">warning</i>
+ % }
+ % elsif ($traewelling->{pull_sync}) {
+ – Checkins in Träwelling werden von travelynx übernommen
+ % }
+ % elsif ($traewelling->{push_sync}) {
+ – Checkins in travelynx werden zu Träwelling weitergereicht
+ % }
% }
- % }
- </td>
- </tr>
+ </td>
+ </tr>
+ % }
<tr>
<th scope="row">Externe Dienste</th>
<td>