From f2eb14a4443d00e58ed7cb1ce5528776ba04b3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20Rama=C5=A1euski?= <andrej@x2.cz> Date: Tue, 25 Mar 2025 00:32:00 +0100 Subject: [PATCH] Aktualizace OIDC konektora --- VERSION | 2 +- lib/PiTube/Helpers/OAuth2.pm | 4 +++- templates/live.html.ep | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 0bee604..3f684d2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.3.3 +2.3.4 diff --git a/lib/PiTube/Helpers/OAuth2.pm b/lib/PiTube/Helpers/OAuth2.pm index 6d385ab..d2e047e 100644 --- a/lib/PiTube/Helpers/OAuth2.pm +++ b/lib/PiTube/Helpers/OAuth2.pm @@ -23,8 +23,10 @@ sub register { my $res = $tx->result; if ($res->is_success) { + my $key = join "\n", unpack("(A64)*", $res->json->{public_key}); + $jwt = Mojo::JWT->new( - public => sprintf( KEY_FORMAT, $res->json->{public_key} ) + public => sprintf( KEY_FORMAT, $key ) ); } diff --git a/templates/live.html.ep b/templates/live.html.ep index 4b0938e..78c3686 100644 --- a/templates/live.html.ep +++ b/templates/live.html.ep @@ -20,7 +20,7 @@ $('#Streams').bootstrapTable({ onClickCell: function (field, value, row, $element) { window.location.href = '/play/' + row.key; }, - formatNoMatches: function() { return '<p class="text-4xl">AktuálnÄ› neprobĂhá žádnĂ© veĹ™ejnĂ© ĹľivĂ© vysĂlánĂ. Pro zobrazenĂ neveĹ™ejnĂ˝ch vysĂlánĂ se prosĂm <a href="<%= $c->oauth2->authorize %>">pĹ™ihlaste</a></p>' }, + formatNoMatches: function() { return '<p class="text-4xl">AktuálnÄ› neprobĂhá žádnĂ© veĹ™ejnĂ© ĹľivĂ© vysĂlánĂ.<br/>Pro zobrazenĂ neveĹ™ejnĂ˝ch vysĂlánĂ se prosĂm <a href="<%= $c->oauth2->authorize %>">pĹ™ihlaste</a></p>' }, }); function rowStyle(row, index) { -- GitLab