A platform for community discussion. Free, open, simple.
DEV: Move discourse-openid-connect to core (#33570)
Jarek Radosz4525a9aeb4df
diff --git a/.github/labeler.yml b/.github/labeler.ymlindex 1539074b02f..d1721837871 100644--- a/.github/labeler.yml+++ b/.github/labeler.yml@@ -50,6 +50,10 @@ discourse-oauth2-basic:- changed-files:- any-glob-to-any-file: plugins/discourse-oauth2-basic/**/*+discourse-openid-connect:+ - changed-files:+ - any-glob-to-any-file: plugins/discourse-openid-connect/**/*+footnote:- changed-files:- any-glob-to-any-file: plugins/footnote/**/*diff --git a/.gitignore b/.gitignoreindex 61e8c4ad9b8..a870e90b556 100644--- a/.gitignore+++ b/.gitignore@@ -55,6 +55,7 @@!/plugins/discourse-lti!/plugins/discourse-microsoft-auth!/plugins/discourse-oauth2-basic+!/plugins/discourse-openid-connect/plugins/*/auto_generated/spec/fixtures/plugins/my_plugin/auto_generateddiff --git a/plugins/discourse-openid-connect/README.md b/plugins/discourse-openid-connect/README.mdnew file mode 100644index 00000000000..19b48156847--- /dev/null+++ b/plugins/discourse-openid-connect/README.md@@ -0,0 +1,5 @@+# discourse-openid-connect++A plugin to integrate Discourse with an openid-connect login provider++For information and discussion, see https://meta.discourse.org/t/openid-connect-authentication-plugin/103632diff --git a/plugins/discourse-openid-connect/config/locales/client.ar.yml b/plugins/discourse-openid-connect/config/locales/client.ar.ymlnew file mode 100644index 00000000000..aa8510c4658--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.ar.yml@@ -0,0 +1,18 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ar:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "Discourse OpenID Connect"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "باستخدام OpenID Connect"+ message: "المصادقة باستخدام OpenID Connect"diff --git a/plugins/discourse-openid-connect/config/locales/client.be.yml b/plugins/discourse-openid-connect/config/locales/client.be.ymlnew file mode 100644index 00000000000..2ea77a0d350--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.be.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++be:diff --git a/plugins/discourse-openid-connect/config/locales/client.bg.yml b/plugins/discourse-openid-connect/config/locales/client.bg.ymlnew file mode 100644index 00000000000..52333529d3c--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.bg.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++bg:diff --git a/plugins/discourse-openid-connect/config/locales/client.bs_BA.yml b/plugins/discourse-openid-connect/config/locales/client.bs_BA.ymlnew file mode 100644index 00000000000..828a7e65af8--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.bs_BA.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++bs_BA:diff --git a/plugins/discourse-openid-connect/config/locales/client.ca.yml b/plugins/discourse-openid-connect/config/locales/client.ca.ymlnew file mode 100644index 00000000000..ec737bc1a5b--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.ca.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ca:diff --git a/plugins/discourse-openid-connect/config/locales/client.cs.yml b/plugins/discourse-openid-connect/config/locales/client.cs.ymlnew file mode 100644index 00000000000..041b2f0bd05--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.cs.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++cs:diff --git a/plugins/discourse-openid-connect/config/locales/client.da.yml b/plugins/discourse-openid-connect/config/locales/client.da.ymlnew file mode 100644index 00000000000..f39c727c594--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.da.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++da:diff --git a/plugins/discourse-openid-connect/config/locales/client.de.yml b/plugins/discourse-openid-connect/config/locales/client.de.ymlnew file mode 100644index 00000000000..6a03492f670--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.de.yml@@ -0,0 +1,18 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++de:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "Discourse – OpenID Connect"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "mit OpenID Connect"+ message: "Authentifizierung mit OpenID Connect"diff --git a/plugins/discourse-openid-connect/config/locales/client.el.yml b/plugins/discourse-openid-connect/config/locales/client.el.ymlnew file mode 100644index 00000000000..d872d0ecc40--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.el.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++el:diff --git a/plugins/discourse-openid-connect/config/locales/client.en.yml b/plugins/discourse-openid-connect/config/locales/client.en.ymlnew file mode 100644index 00000000000..29df759c285--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.en.yml@@ -0,0 +1,12 @@+en:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "Discourse OpenID Connect"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "with OpenID Connect"+ message: "Authenticating with OpenID Connect"diff --git a/plugins/discourse-openid-connect/config/locales/client.en_GB.yml b/plugins/discourse-openid-connect/config/locales/client.en_GB.ymlnew file mode 100644index 00000000000..2d4fa180ec7--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.en_GB.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++en_GB:diff --git a/plugins/discourse-openid-connect/config/locales/client.es.yml b/plugins/discourse-openid-connect/config/locales/client.es.ymlnew file mode 100644index 00000000000..d7cf5d52164--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.es.yml@@ -0,0 +1,18 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++es:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "OpenID Connect de Discourse"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "con OpenID Connect"+ message: "Autenticación con OpenID Connect"diff --git a/plugins/discourse-openid-connect/config/locales/client.et.yml b/plugins/discourse-openid-connect/config/locales/client.et.ymlnew file mode 100644index 00000000000..0ea0b6d554b--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.et.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++et:diff --git a/plugins/discourse-openid-connect/config/locales/client.fa_IR.yml b/plugins/discourse-openid-connect/config/locales/client.fa_IR.ymlnew file mode 100644index 00000000000..56512089fb5--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.fa_IR.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++fa_IR:diff --git a/plugins/discourse-openid-connect/config/locales/client.fi.yml b/plugins/discourse-openid-connect/config/locales/client.fi.ymlnew file mode 100644index 00000000000..e96e5571a35--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.fi.yml@@ -0,0 +1,18 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++fi:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "Discourse OpenID Connect"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "OpenID Connectilla"+ message: "Todennus OpenID Connectilla"diff --git a/plugins/discourse-openid-connect/config/locales/client.fr.yml b/plugins/discourse-openid-connect/config/locales/client.fr.ymlnew file mode 100644index 00000000000..1c9b424650c--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.fr.yml@@ -0,0 +1,18 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++fr:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "Discours OpenID Connect"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "avec OpenID Connect"+ message: "Authentification avec OpenID Connect"diff --git a/plugins/discourse-openid-connect/config/locales/client.gl.yml b/plugins/discourse-openid-connect/config/locales/client.gl.ymlnew file mode 100644index 00000000000..fb911ce1635--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.gl.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++gl:diff --git a/plugins/discourse-openid-connect/config/locales/client.he.yml b/plugins/discourse-openid-connect/config/locales/client.he.ymlnew file mode 100644index 00000000000..016437facd5--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.he.yml@@ -0,0 +1,18 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++he:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "Discourse OpenID Connect"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "עם OpenID Connect"+ message: "אימות דרך OpenID Connect"diff --git a/plugins/discourse-openid-connect/config/locales/client.hr.yml b/plugins/discourse-openid-connect/config/locales/client.hr.ymlnew file mode 100644index 00000000000..93343ce6e19--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.hr.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++hr:diff --git a/plugins/discourse-openid-connect/config/locales/client.hu.yml b/plugins/discourse-openid-connect/config/locales/client.hu.ymlnew file mode 100644index 00000000000..76b6e9d8bcb--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.hu.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++hu:diff --git a/plugins/discourse-openid-connect/config/locales/client.hy.yml b/plugins/discourse-openid-connect/config/locales/client.hy.ymlnew file mode 100644index 00000000000..cb18f64d356--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.hy.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++hy:diff --git a/plugins/discourse-openid-connect/config/locales/client.id.yml b/plugins/discourse-openid-connect/config/locales/client.id.ymlnew file mode 100644index 00000000000..596e36b2e13--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.id.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++id:diff --git a/plugins/discourse-openid-connect/config/locales/client.it.yml b/plugins/discourse-openid-connect/config/locales/client.it.ymlnew file mode 100644index 00000000000..39c9b2ee5c3--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.it.yml@@ -0,0 +1,18 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++it:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "Discourse OpenID Connect"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "con OpenID Connect"+ message: "Autenticazione con OpenID Connect"diff --git a/plugins/discourse-openid-connect/config/locales/client.ja.yml b/plugins/discourse-openid-connect/config/locales/client.ja.ymlnew file mode 100644index 00000000000..bb9037fdcff--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.ja.yml@@ -0,0 +1,18 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ja:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "Discourse OpenID Connect"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "OpenID Connect"+ message: "OpenID Connect で認証"diff --git a/plugins/discourse-openid-connect/config/locales/client.ko.yml b/plugins/discourse-openid-connect/config/locales/client.ko.ymlnew file mode 100644index 00000000000..18dd77fd3ec--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.ko.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ko:diff --git a/plugins/discourse-openid-connect/config/locales/client.lt.yml b/plugins/discourse-openid-connect/config/locales/client.lt.ymlnew file mode 100644index 00000000000..16bb19758dc--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.lt.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++lt:diff --git a/plugins/discourse-openid-connect/config/locales/client.lv.yml b/plugins/discourse-openid-connect/config/locales/client.lv.ymlnew file mode 100644index 00000000000..59e0ef6f4ed--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.lv.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++lv:diff --git a/plugins/discourse-openid-connect/config/locales/client.nb_NO.yml b/plugins/discourse-openid-connect/config/locales/client.nb_NO.ymlnew file mode 100644index 00000000000..2e2224d1472--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.nb_NO.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++nb_NO:diff --git a/plugins/discourse-openid-connect/config/locales/client.nl.yml b/plugins/discourse-openid-connect/config/locales/client.nl.ymlnew file mode 100644index 00000000000..76d89faaaf8--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.nl.yml@@ -0,0 +1,18 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++nl:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "Discourse OpenID Connect"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "met OpenID Connect"+ message: "Verificatie met OpenID Connect"diff --git a/plugins/discourse-openid-connect/config/locales/client.pl_PL.yml b/plugins/discourse-openid-connect/config/locales/client.pl_PL.ymlnew file mode 100644index 00000000000..a260c31c64c--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.pl_PL.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++pl_PL:diff --git a/plugins/discourse-openid-connect/config/locales/client.pt.yml b/plugins/discourse-openid-connect/config/locales/client.pt.ymlnew file mode 100644index 00000000000..298ba523c1d--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.pt.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++pt:diff --git a/plugins/discourse-openid-connect/config/locales/client.pt_BR.yml b/plugins/discourse-openid-connect/config/locales/client.pt_BR.ymlnew file mode 100644index 00000000000..f98e056cfc2--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.pt_BR.yml@@ -0,0 +1,18 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++pt_BR:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "Discourse OpenID Connect"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "com OpenID Connect"+ message: "Autenticação com OpenID Connect"diff --git a/plugins/discourse-openid-connect/config/locales/client.ro.yml b/plugins/discourse-openid-connect/config/locales/client.ro.ymlnew file mode 100644index 00000000000..08a77f812ee--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.ro.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ro:diff --git a/plugins/discourse-openid-connect/config/locales/client.ru.yml b/plugins/discourse-openid-connect/config/locales/client.ru.ymlnew file mode 100644index 00000000000..0ebedf65a18--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.ru.yml@@ -0,0 +1,18 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ru:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "OpenID Connect для Discourse"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "через OpenID Connect"+ message: "Аутентификация через OpenID Connect"diff --git a/plugins/discourse-openid-connect/config/locales/client.sk.yml b/plugins/discourse-openid-connect/config/locales/client.sk.ymlnew file mode 100644index 00000000000..6f815624081--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.sk.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++sk:diff --git a/plugins/discourse-openid-connect/config/locales/client.sl.yml b/plugins/discourse-openid-connect/config/locales/client.sl.ymlnew file mode 100644index 00000000000..23489a48b1f--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.sl.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++sl:diff --git a/plugins/discourse-openid-connect/config/locales/client.sq.yml b/plugins/discourse-openid-connect/config/locales/client.sq.ymlnew file mode 100644index 00000000000..7f051b7a7cf--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.sq.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++sq:diff --git a/plugins/discourse-openid-connect/config/locales/client.sr.yml b/plugins/discourse-openid-connect/config/locales/client.sr.ymlnew file mode 100644index 00000000000..88d63d6ae1a--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.sr.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++sr:diff --git a/plugins/discourse-openid-connect/config/locales/client.sv.yml b/plugins/discourse-openid-connect/config/locales/client.sv.ymlnew file mode 100644index 00000000000..6f4efff8a87--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.sv.yml@@ -0,0 +1,13 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++sv:+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "med OpenID Connect"+ message: "Autentisering med OpenID Connect"diff --git a/plugins/discourse-openid-connect/config/locales/client.sw.yml b/plugins/discourse-openid-connect/config/locales/client.sw.ymlnew file mode 100644index 00000000000..0d7cdd075bf--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.sw.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++sw:diff --git a/plugins/discourse-openid-connect/config/locales/client.te.yml b/plugins/discourse-openid-connect/config/locales/client.te.ymlnew file mode 100644index 00000000000..03967bdbb07--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.te.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++te:diff --git a/plugins/discourse-openid-connect/config/locales/client.th.yml b/plugins/discourse-openid-connect/config/locales/client.th.ymlnew file mode 100644index 00000000000..7de85ff91c4--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.th.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++th:diff --git a/plugins/discourse-openid-connect/config/locales/client.tr_TR.yml b/plugins/discourse-openid-connect/config/locales/client.tr_TR.ymlnew file mode 100644index 00000000000..320dfc88de9--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.tr_TR.yml@@ -0,0 +1,18 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++tr_TR:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "Discourse OpenID Connect"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "OpenID Connect ile"+ message: "OpenID Connect ile Kimlik Doğrulama"diff --git a/plugins/discourse-openid-connect/config/locales/client.ug.yml b/plugins/discourse-openid-connect/config/locales/client.ug.ymlnew file mode 100644index 00000000000..a6bf0185ae2--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.ug.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ug:diff --git a/plugins/discourse-openid-connect/config/locales/client.uk.yml b/plugins/discourse-openid-connect/config/locales/client.uk.ymlnew file mode 100644index 00000000000..f1390545d1d--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.uk.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++uk:diff --git a/plugins/discourse-openid-connect/config/locales/client.ur.yml b/plugins/discourse-openid-connect/config/locales/client.ur.ymlnew file mode 100644index 00000000000..b4a9c21ee2f--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.ur.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ur:diff --git a/plugins/discourse-openid-connect/config/locales/client.vi.yml b/plugins/discourse-openid-connect/config/locales/client.vi.ymlnew file mode 100644index 00000000000..f629dcf5329--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.vi.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++vi:diff --git a/plugins/discourse-openid-connect/config/locales/client.zh_CN.yml b/plugins/discourse-openid-connect/config/locales/client.zh_CN.ymlnew file mode 100644index 00000000000..d87687dcb0c--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.zh_CN.yml@@ -0,0 +1,18 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++zh_CN:+ admin_js:+ admin:+ site_settings:+ categories:+ discourse_openid_connect: "Discourse OpenID Connect"+ js:+ login:+ oidc:+ name: "OpenID Connect"+ title: "使用 OpenID Connect"+ message: "正在使用 OpenID Connect 进行身份验证"diff --git a/plugins/discourse-openid-connect/config/locales/client.zh_TW.yml b/plugins/discourse-openid-connect/config/locales/client.zh_TW.ymlnew file mode 100644index 00000000000..7e15fab0018--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/client.zh_TW.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++zh_TW:diff --git a/plugins/discourse-openid-connect/config/locales/server.ar.yml b/plugins/discourse-openid-connect/config/locales/server.ar.ymlnew file mode 100644index 00000000000..9d3bdc4732d--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.ar.yml@@ -0,0 +1,27 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ar:+ site_settings:+ openid_connect_enabled: تفعيل مصادقة OpenID Connect. يمكنك تخصيص نص واجهة المستخدم <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>هنا</a>+ openid_connect_discovery_document: "عنوان URL لمستند استكشاف OpenID Connect. موجود عادةً على \"https://your.domain/.well-known/openid-configuration\""+ openid_connect_client_id: "معرِّف العميل لـ OpenID Connect"+ openid_connect_client_secret: "سر عميل OpenID Connect"+ openid_connect_authorize_scope: "النطاقات المرسلة إلى نقطة نهاية المصادقة. يجب أن يتضمَّن ذلك 'openid'."+ openid_connect_rp_initiated_logout: "إعادة توجيه المستخدام إلى end_session_endpoint بعد تسجيل الخروج. يجب دعم هذا الإعداد من قِبل موفِّر الهوية وتضمينه في مستند الاستكشاف."+ openid_connect_rp_initiated_logout_redirect: "(اختياري) post_logout_redirect_uri الذي سيتم تمريره إلى نقطة نهاية تسجيل الخروج. في حال إدخاله، فإنه يجب تسجيله باستخدام موفِّر الهوية."+ openid_connect_token_scope: "النطاقات المرسلة عند طلب نقطة نهاية الرمز المميَّز. لا تتطلب المواصفات الرسمية ذلك."+ openid_connect_error_redirects: "إذا كان رد الاتصال error_reason يحتوي على المعلمة الأولى، فستتم إعادة توجيه المستخدم إلى عنوان URL في المعلمة الثانية"+ openid_connect_allow_association_change: "السماح للمستخدمين بإلغاء ربط حسابات Discourse وإعادة ربطها من مقدِّم خدمة OpenID Connect"+ openid_connect_verbose_logging: "تسجيل معلومات مصادقة openid-connect المفصَّلة في `/logs`. اترك هذا الإعداد متوقفًا خلال الاستخدام العادي."+ openid_connect_authorize_parameters: "معلمات عنوان URL التي تضمينها في إعادة التوجيه من /auth/oidc إلى نقطة نهاية مصادقة IDP"+ openid_connect_overrides_email: "تجاوز عنوان البريد الإلكتروني للمستخدم باستخدام قيمة openid-connect في كل عملية تسجيل دخول. يعمل هذا الإعداد بنفس طريقة عمل `auth_overrides_email`، لكنه خاص بعمليات تسجيل الدخول باستخدام OpenID Connect."+ openid_connect_claims: "تحديد المطالبات بشكلٍ صريح، والتي سيتم استخدامها مع مقدِّمي الخدمة الذي لا يعيدون تمرير البيانات حسب النطاقات (JSON)"+ openid_connect_match_by_email: "استخدم عنوان البريد الإلكتروني لمطابقة مصادقات OpenID Connect مع حسابات مستخدمي Discourse الموجودة."+ openid_connect_use_pkce: "تفعيل Proof Key for Code Exchange (PKCE) لمصادقة OpenID Connect."+ login:+ omniauth_error:+ openid_connect_discovery_error: يتعذَّر جلب التهيئة من موفِّر الهوية. يُرجى إعادة المحاولة.diff --git a/plugins/discourse-openid-connect/config/locales/server.be.yml b/plugins/discourse-openid-connect/config/locales/server.be.ymlnew file mode 100644index 00000000000..2ea77a0d350--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.be.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++be:diff --git a/plugins/discourse-openid-connect/config/locales/server.bg.yml b/plugins/discourse-openid-connect/config/locales/server.bg.ymlnew file mode 100644index 00000000000..52333529d3c--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.bg.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++bg:diff --git a/plugins/discourse-openid-connect/config/locales/server.bs_BA.yml b/plugins/discourse-openid-connect/config/locales/server.bs_BA.ymlnew file mode 100644index 00000000000..828a7e65af8--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.bs_BA.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++bs_BA:diff --git a/plugins/discourse-openid-connect/config/locales/server.ca.yml b/plugins/discourse-openid-connect/config/locales/server.ca.ymlnew file mode 100644index 00000000000..ec737bc1a5b--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.ca.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ca:diff --git a/plugins/discourse-openid-connect/config/locales/server.cs.yml b/plugins/discourse-openid-connect/config/locales/server.cs.ymlnew file mode 100644index 00000000000..041b2f0bd05--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.cs.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++cs:diff --git a/plugins/discourse-openid-connect/config/locales/server.da.yml b/plugins/discourse-openid-connect/config/locales/server.da.ymlnew file mode 100644index 00000000000..f39c727c594--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.da.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++da:diff --git a/plugins/discourse-openid-connect/config/locales/server.de.yml b/plugins/discourse-openid-connect/config/locales/server.de.ymlnew file mode 100644index 00000000000..9b576ea87d2--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.de.yml@@ -0,0 +1,27 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++de:+ site_settings:+ openid_connect_enabled: Aktiviere die OpenID-Connect-Authentifizierung. Passe den Text der Benutzeroberfläche <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>hier</a> an+ openid_connect_discovery_document: "URL des OpenID-Connect-Discovery-Dokuments. Normalerweise zu finden unter „https://your.domain/.well-known/openid-configuration“"+ openid_connect_client_id: "OpenID-Connect-Client-ID"+ openid_connect_client_secret: "OpenID-Connect-Client-Geheimnis"+ openid_connect_authorize_scope: "Die Bereiche, die an den Autorisierungsendpunkt gesendet werden. Muss „openid“ enthalten."+ openid_connect_rp_initiated_logout: "Leitet den Benutzer nach der Abmeldung zum end_session_endpoint um. Muss von deinem Identitätsanbieter unterstützt werden und im Discovery-Dokument enthalten sein."+ openid_connect_rp_initiated_logout_redirect: "(Optional) Die post_logout_redirect_uri, die an den Abmeldungsendpunkt übergeben wird. Wenn sie angegeben wird, muss sie beim Identitätsanbieter registriert sein."+ openid_connect_token_scope: "Die Bereiche, die bei der Anforderung des Token-Endpunkts gesendet werden. Die offizielle Spezifikation erfordert dies nicht."+ openid_connect_error_redirects: "Wenn der Callback error_reason den ersten Parameter enthält, wird der Benutzer zu der URL im zweiten Parameter umgeleitet"+ openid_connect_allow_association_change: "Erlaube es Benutzern, ihre Discourse-Konten vom OpenID-Connect-Anbieter zu trennen und wieder mit diesem zu verbinden"+ openid_connect_verbose_logging: "Protokolliere detaillierte openid-connect-Authentifizierungsinformationen in `/logs`. Bei normalem Gebrauch deaktiviert lassen."+ openid_connect_authorize_parameters: "URL-Parameter, die in der Umleitung von /auth/oidc zum Autorisierungsendpunkt des IDP enthalten sind"+ openid_connect_overrides_email: "Überschreibe bei jeder Anmeldung die E-Mail-Adresse des Benutzers mit dem openid-connect-Wert. Funktioniert genauso wie die Einstellung `auth_overrides_email`, gilt aber spezifisch für OpenID-Connect-Anmeldungen."+ openid_connect_claims: "Definiert explizit Ansprüche, die bei Anbietern verwendet werden sollen, die keine Daten basierend auf Bereichen zurückgeben. (JSON)"+ openid_connect_match_by_email: "Verwende eine E-Mail-Adresse, um OpenID Connect-Authentifizierungen mit bestehenden Discourse-Benutzerkonten abzugleichen."+ openid_connect_use_pkce: "Proof Key for Code Exchange (PKCE) für „OpenID Connect“-Authentifizierung aktivieren."+ login:+ omniauth_error:+ openid_connect_discovery_error: Konfiguration kann nicht vom Identitätsanbieter abgerufen werden. Bitte versuche es erneut.diff --git a/plugins/discourse-openid-connect/config/locales/server.el.yml b/plugins/discourse-openid-connect/config/locales/server.el.ymlnew file mode 100644index 00000000000..d872d0ecc40--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.el.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++el:diff --git a/plugins/discourse-openid-connect/config/locales/server.en.yml b/plugins/discourse-openid-connect/config/locales/server.en.ymlnew file mode 100644index 00000000000..0058991faac--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.en.yml@@ -0,0 +1,21 @@+en:+ site_settings:+ openid_connect_enabled: Enable OpenID Connect authentication. Customize user interface text <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>here</a>+ openid_connect_discovery_document: "OpenID Connect discovery document URL. Normally located at 'https://your.domain/.well-known/openid-configuration'"+ openid_connect_client_id: "OpenID Connect client ID"+ openid_connect_client_secret: "OpenID Connect client secret"+ openid_connect_authorize_scope: "The scopes sent to the authorize endpoint. This must include 'openid'."+ openid_connect_rp_initiated_logout: "Redirect the user to end_session_endpoint after logout. Must be supported by your identity provider and included in the discovery document."+ openid_connect_rp_initiated_logout_redirect: "(optional) The post_logout_redirect_uri which will be passed to the logout endpoint. If provided, it must be registered with the identity provider."+ openid_connect_token_scope: "The scopes sent when requesting the token endpoint. The official specification does not require this."+ openid_connect_error_redirects: "If the callback error_reason contains the first parameter, the user will be redirected to the URL in the second parameter"+ openid_connect_allow_association_change: "Allow users to disconnect and reconnect their Discourse accounts from the OpenID Connect provider"+ openid_connect_verbose_logging: "Log detailed openid-connect authentication information to `/logs`. Keep this disabled during normal use."+ openid_connect_authorize_parameters: "URL parameters which will be included in the redirect from /auth/oidc to the IDP's authorize endpoint"+ openid_connect_overrides_email: "On every login, override the user's email using the openid-connect value. Works the same as the `auth_overrides_email` setting, but is specific to OpenID Connect logins."+ openid_connect_claims: "Explicitly define the claims for use with providers that don't pass data back based on scopes. (JSON)"+ openid_connect_match_by_email: "Use email address to match OpenID Connect authentications to existing Discourse user accounts."+ openid_connect_use_pkce: "Enable Proof Key for Code Exchange (PKCE) for OpenID Connect authentication."+ login:+ omniauth_error:+ openid_connect_discovery_error: Unable to fetch configuration from identity provider. Please try again.diff --git a/plugins/discourse-openid-connect/config/locales/server.en_GB.yml b/plugins/discourse-openid-connect/config/locales/server.en_GB.ymlnew file mode 100644index 00000000000..2d4fa180ec7--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.en_GB.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++en_GB:diff --git a/plugins/discourse-openid-connect/config/locales/server.es.yml b/plugins/discourse-openid-connect/config/locales/server.es.ymlnew file mode 100644index 00000000000..44d874535ec--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.es.yml@@ -0,0 +1,27 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++es:+ site_settings:+ openid_connect_enabled: Habilita la autenticación de OpenID Connect. Personaliza el texto de la interfaz de usuario <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>aquí</a>+ openid_connect_discovery_document: "URL del documento de descubrimiento de OpenID Connect. Normalmente ubicado en 'https://your.domain/.well-known/openid-configuration'"+ openid_connect_client_id: "ID de cliente de OpenID Connect"+ openid_connect_client_secret: "Secreto de cliente de OpenID Connect"+ openid_connect_authorize_scope: "Los ámbitos enviados al terminal autorizado. Esto debe incluir «openid»."+ openid_connect_rp_initiated_logout: "Redirigir al usuario a end_session_endpoint después de cerrar sesión. Debe estar respaldado por su proveedor de identidad e incluido en el documento de descubrimiento."+ openid_connect_rp_initiated_logout_redirect: "(opcional) El post_logout_redirect_uri que se pasará al terminal de cierre de sesión. Si se proporciona, debe registrarse con el proveedor de identidad."+ openid_connect_token_scope: "Los ámbitos enviados al solicitar el terminal del token. La especificación oficial no requiere esto."+ openid_connect_error_redirects: "Si el callback error_reason contiene el primer parámetro, el usuario será redirigido a la URL en el segundo parámetro"+ openid_connect_allow_association_change: "Permitir a los usuarios desconectar y volver a conectar sus cuentas de Discourse desde el proveedor OpenID Connect"+ openid_connect_verbose_logging: "Registrar la información detallada de la autenticación de openid-connect en `/logs`. Mantén esto desactivado durante el uso normal."+ openid_connect_authorize_parameters: "Parámetros de URL que se incluirán en la redirección desde /auth/oidc al terminal autorizado del IDP"+ openid_connect_overrides_email: "En cada inicio de sesión, sobrescribir el correo electrónico del usuario con el valor openid-connect. Funciona igual que la configuración `auth_overrides_email`, pero es específica de los inicios de sesión de OpenID Connect."+ openid_connect_claims: "Definir explícitamente las reclamaciones de uso con proveedores que no pasen los datos basados en ámbitos. (JSON)"+ openid_connect_match_by_email: "Utiliza la dirección de correo electrónico para asociar las autenticaciones de OpenID Connect con las cuentas de usuario de Discourse existentes."+ openid_connect_use_pkce: "Activar la Clave de Prueba para el Intercambio de Códigos (PKCE) para la autenticación de OpenID Connect."+ login:+ omniauth_error:+ openid_connect_discovery_error: No se puede obtener la configuración del proveedor de identidades. Inténtalo de nuevo.diff --git a/plugins/discourse-openid-connect/config/locales/server.et.yml b/plugins/discourse-openid-connect/config/locales/server.et.ymlnew file mode 100644index 00000000000..0ea0b6d554b--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.et.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++et:diff --git a/plugins/discourse-openid-connect/config/locales/server.fa_IR.yml b/plugins/discourse-openid-connect/config/locales/server.fa_IR.ymlnew file mode 100644index 00000000000..405c351f7b2--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.fa_IR.yml@@ -0,0 +1,9 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++fa_IR:+ site_settings:+ openid_connect_match_by_email: "از آدرس ایمیلی که برای مطابقت با احراز هویت OpenID متصل به حساب کاربری موجود دیسکورس استفاده کنید."diff --git a/plugins/discourse-openid-connect/config/locales/server.fi.yml b/plugins/discourse-openid-connect/config/locales/server.fi.ymlnew file mode 100644index 00000000000..9f02d9e2137--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.fi.yml@@ -0,0 +1,27 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++fi:+ site_settings:+ openid_connect_enabled: Ota OpenID Connect -todennus käyttöön. Mukauta käyttöliittymän tekstiä <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>täällä</a>+ openid_connect_discovery_document: "OpenID Connectin discovery-asiakirjan URL-osoite. Sijaitsee yleensä osoitteessa https://verkkotunnus/.well-known/openid-configuration"+ openid_connect_client_id: "OpenID Connectin asiakastunnus"+ openid_connect_client_secret: "OpenID Connectin asiakkaan salatunnus"+ openid_connect_authorize_scope: "Valtuutuspäätepisteeseen lähetetyt alueet. Tämän täytyy sisältää \"openid\"."+ openid_connect_rp_initiated_logout: "Ohjaa käyttäjä uudelleen end_session_endpointiin uloskirjautumisen jälkeen. Tämän täytyy olla identiteettipalveluntarjoajasi tukema ja sisältyä discovery-asiakirjaan."+ openid_connect_rp_initiated_logout_redirect: "(valinnainen) post_logout_redirect_uri, joka välitetään uloskirjautumisen päätepisteeseen. Jos se määritetään, se täytyy rekisteröidä identiteettipalveluntarjoajalla."+ openid_connect_token_scope: "Tunnuspäätepistettä pyydettäessä lähetetyt alueet. Virallinen määritys ei vaadi tätä."+ openid_connect_error_redirects: "Jos vastakutsun error_reason sisältää ensimmäisen parametrin, käyttäjä ohjataan toisen parametrin URL-osoitteeseen"+ openid_connect_allow_association_change: "Salli käyttäjien katkaista Discourse-tilinsä yhteys OpenID Connect -palveluntarjoajaan ja yhdistää se uudelleen"+ openid_connect_verbose_logging: "Kirjaa yksityiskohtaiset openid-connect-todennustiedot /logs-polkuun. Älä pidä tätä käytössä normaalin käytön aikana."+ openid_connect_authorize_parameters: "URL-parametrit, jotka sisällytetään uudelleenohjaukseen /auth/oidc:stä IDP:n valtuutuspäätepisteeseen"+ openid_connect_overrides_email: "Korvaa jokaisen kirjautumisen yhteydessä käyttäjän sähköpostiosoite openid-connect-arvolla. Toimii samalla tavalla kuin \"auth_overrides_email\" -asetus, mutta koskee OpenID Connect -kirjautumisia."+ openid_connect_claims: "Määritä käytettävät vaatimukset palveluntarjoajilla, jotka eivät lähetä tietoja takaisin alueiden perusteella. (JSON)"+ openid_connect_match_by_email: "Yhdistä OpenID Connect -todennukset olemassa oleviin Discourse-tileihin sähköpostiosoitteiden perusteella."+ openid_connect_use_pkce: "Ota käyttöön Proof Key for Code Exchange (PKCE) OpenID Connect -todennuksessa."+ login:+ omniauth_error:+ openid_connect_discovery_error: Määrityksen noutaminen identiteettipalveluntarjoajalta ei onnistunut. Yritä uudelleen.diff --git a/plugins/discourse-openid-connect/config/locales/server.fr.yml b/plugins/discourse-openid-connect/config/locales/server.fr.ymlnew file mode 100644index 00000000000..d6b421e807f--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.fr.yml@@ -0,0 +1,27 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++fr:+ site_settings:+ openid_connect_enabled: Activer l'authentification OpenID Connect. Personnaliser le texte de l'interface utilisateur <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>ici</a>+ openid_connect_discovery_document: "URL du document de découverte OpenID Connect. Normalement situé à l'adresse https://your.domain/.well-known/openid-configuration"+ openid_connect_client_id: "ID de client OpenID Connect"+ openid_connect_client_secret: "Secret du client OpenID Connect"+ openid_connect_authorize_scope: "Les autorisations envoyées au point de terminaison d'autorisation. Cela doit inclure « openid »."+ openid_connect_rp_initiated_logout: "Rediriger l'utilisateur vers end_session_endpoint après la déconnexion. Doit être supporté par votre fournisseur d'identité et inclus dans le document de découverte."+ openid_connect_rp_initiated_logout_redirect: "(facultatif) Le post_logout_redirect_uri qui sera transmis au point de terminaison de déconnexion. S'il est fourni, il doit être enregistré auprès du fournisseur d'identité."+ openid_connect_token_scope: "Les autorisations envoyées lors de la demande du point de terminaison du jeton. Les spécifications officielles ne l'exigent pas."+ openid_connect_error_redirects: "Si le rappel error_reason contient le premier paramètre, l'utilisateur sera redirigé vers l'adresse URL reprise dans le deuxième paramètre"+ openid_connect_allow_association_change: "Autoriser les utilisateurs à déconnecter et à reconnecter leurs comptes Discourse du fournisseur OpenID Connect"+ openid_connect_verbose_logging: "Consigne les informations d'authentification détaillées d'openid-connect dans « /logs ». Maintenez cette option désactivée pendant l'utilisation normale."+ openid_connect_authorize_parameters: "Paramètres de l'adresse URL qui seront inclus dans la redirection de /auth/oidc vers le point de terminaison d'autorisation de l'IDP"+ openid_connect_overrides_email: "À chaque connexion, remplacer l'adresse e-mail de l'utilisateur à l'aide de la valeur openid-connect. Fonctionne de la même manière que le paramètre « auth_overrides_email », mais est spécifique aux connexions OpenID Connect."+ openid_connect_claims: "Définir explicitement les revendications à utiliser avec les fournisseurs qui ne retransmettent pas les données en fonction des autorisations. (JSON)"+ openid_connect_match_by_email: "Utilisez l'adresse e-mail pour associer les authentifications OpenID Connect aux comptes utilisateur Discourse existants."+ openid_connect_use_pkce: "Activez la clé de preuve pour l'échange de codes (PKCE) pour l'authentification OpenID Connect."+ login:+ omniauth_error:+ openid_connect_discovery_error: Impossible de récupérer la configuration du fournisseur d'identité. Veuillez réessayer.diff --git a/plugins/discourse-openid-connect/config/locales/server.gl.yml b/plugins/discourse-openid-connect/config/locales/server.gl.ymlnew file mode 100644index 00000000000..fb911ce1635--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.gl.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++gl:diff --git a/plugins/discourse-openid-connect/config/locales/server.he.yml b/plugins/discourse-openid-connect/config/locales/server.he.ymlnew file mode 100644index 00000000000..8f8746fec8e--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.he.yml@@ -0,0 +1,27 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++he:+ site_settings:+ openid_connect_enabled: הפעלת אימות דרך OpenID Connect. ניתן לערוך את טקסט מנשק המשתמש <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>כאן</a>.+ openid_connect_discovery_document: "כתובת מסמך גילוי של OpenID Connect. בדרך כלל ממוקם תחת ‚https://your.domain/.well-known/openid-configuration’"+ openid_connect_client_id: "מזהה לקוח OpenID Connect"+ openid_connect_client_secret: "סוד לקוח OpenID Connect"+ openid_connect_authorize_scope: "התחומים שנשלחו לנקודת הקצה לאימות. חייב לכלול את ‚openid’."+ openid_connect_rp_initiated_logout: "הפניית המשתמש ל־end_session_endpoint לאחר יציאה מהמערכת. על ספק הזהות שלך לתמוך בזה ולכלול את זה במסמך הגילוי."+ openid_connect_rp_initiated_logout_redirect: "(רשות) ה־post_logout_redirect_uri שיועבר לנקודת הקצה ליציאה. אם סופק, עליו להיות רשום מול ספק הזהות."+ openid_connect_token_scope: "התחומים נשלחים בעת בקשת נקודת הקצה כנגד האסימון. המפרט הרשמי לא דורש את זה."+ openid_connect_error_redirects: "אם הקריאה החוזרת error_reason מחזירה את המשתנה הראשון, המשתמש יופנה אל הכתובת שבמשתנה השני"+ openid_connect_allow_association_change: "לאפשר למשתמשים להתנתק ולהתחבר מחדש לחשבונות ה־Discourse שלהם מספק ה־OpenID Connect שלהם."+ openid_connect_verbose_logging: "תיעוד פרטי אימות openid-connect מפורטים אל `/logs`. עדיף להשבית במהלך תפעול שגרתי."+ openid_connect_authorize_parameters: "משתני הכתובת שיתווספו להפניה מ־/auth/oidc לנקודת הקצה לאימות של ספק הזהות"+ openid_connect_overrides_email: "בכל כניסה למערכת, לדרוס את כתובת הדוא״ל עם ערך openid-connect. עובד כמו ההגדרה `auth_overrides_email` (אימות עוקף דוא״ל), אך הוא משמש נקודתית לכניסה עם OpenID Connect."+ openid_connect_claims: "הגדרת הטענות במפורש לשימוש מול ספקים שלא מעבירים נתונים בחזרה על סמך תחומים. (JSON)"+ openid_connect_match_by_email: "להשתמש בכתובת דוא״ל כדי לתאם את אימותי OpenID Connect לחשבונות משתמש קיימים ב־Discourse."+ openid_connect_use_pkce: "הפעלת מפתח הוכחה לחילופי קודים (PKCE) עבור אימות OpenID Connect."+ login:+ omniauth_error:+ openid_connect_discovery_error: לא ניתן לקבל תצורה מספק הזהות. נא לנסות שובdiff --git a/plugins/discourse-openid-connect/config/locales/server.hr.yml b/plugins/discourse-openid-connect/config/locales/server.hr.ymlnew file mode 100644index 00000000000..93343ce6e19--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.hr.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++hr:diff --git a/plugins/discourse-openid-connect/config/locales/server.hu.yml b/plugins/discourse-openid-connect/config/locales/server.hu.ymlnew file mode 100644index 00000000000..76b6e9d8bcb--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.hu.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++hu:diff --git a/plugins/discourse-openid-connect/config/locales/server.hy.yml b/plugins/discourse-openid-connect/config/locales/server.hy.ymlnew file mode 100644index 00000000000..cb18f64d356--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.hy.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++hy:diff --git a/plugins/discourse-openid-connect/config/locales/server.id.yml b/plugins/discourse-openid-connect/config/locales/server.id.ymlnew file mode 100644index 00000000000..596e36b2e13--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.id.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++id:diff --git a/plugins/discourse-openid-connect/config/locales/server.it.yml b/plugins/discourse-openid-connect/config/locales/server.it.ymlnew file mode 100644index 00000000000..e6feadb7cae--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.it.yml@@ -0,0 +1,27 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++it:+ site_settings:+ openid_connect_enabled: Abilita l'autenticazione OpenID Connect. Personalizza il testo dell'interfaccia utente <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>qui</a>+ openid_connect_discovery_document: "URL del documento di individuazione di OpenID Connect. Normalmente si trova in 'https://your.domain/.well-known/openid-configuration'"+ openid_connect_client_id: "ID client di OpenID Connect"+ openid_connect_client_secret: "Segreto client di OpenID Connect"+ openid_connect_authorize_scope: "Gli ambiti inviati all'endpoint di autorizzazione. Devono includere 'openid'."+ openid_connect_rp_initiated_logout: "Reindirizza l'utente a end_session_endpoint dopo la disconnessione. Deve essere supportato dal tuo provider di identità e incluso nel documento di individuazione."+ openid_connect_rp_initiated_logout_redirect: "(facoltativo) Il post_logout_redirect_uri che verrà passato all'endpoint di disconnessione. Se fornito, deve essere registrato presso il provider di identità."+ openid_connect_token_scope: "Gli ambiti inviati quando si richiede l'endpoint del token. Le specifiche ufficiali non li richiedono."+ openid_connect_error_redirects: "Se la richiamata error_reason contiene il primo parametro, l'utente verrà reindirizzato all'URL nel secondo parametro"+ openid_connect_allow_association_change: "Consenti agli utenti di disconnettersi e riconnettersi ai propri account Discourse dal provider OpenID Connect"+ openid_connect_verbose_logging: "Registra informazioni dettagliate sull'autenticazione openid-connect in `/logs`. Mantenere questa opzione disabilitata durante il normale utilizzo."+ openid_connect_authorize_parameters: "Parametri URL che verranno inclusi nel reindirizzamento da /auth/oidc all'endpoint di autorizzazione dell'IDP"+ openid_connect_overrides_email: "Ad ogni accesso, sovrascrive l'e-mail dell'utente utilizzando il valore openid-connect. Funziona allo stesso modo dell'impostazione `auth_overrides_email`, ma è specifico per gli accessi OpenID Connect."+ openid_connect_claims: "Definisce in modo esplicito le attestazioni da usare con i provider che non restituiscono i dati in base agli ambiti. (JSON)"+ openid_connect_match_by_email: "Utilizza l'indirizzo e-mail per abbinare le autenticazioni OpenID Connect agli account utente Discourse esistenti."+ openid_connect_use_pkce: "Abilita Proof Key for Code Exchange (PKCE) per l'autenticazione OpenID Connect."+ login:+ omniauth_error:+ openid_connect_discovery_error: Impossibile recuperare la configurazione dal provider di identità. Riprovare più tardi.diff --git a/plugins/discourse-openid-connect/config/locales/server.ja.yml b/plugins/discourse-openid-connect/config/locales/server.ja.ymlnew file mode 100644index 00000000000..6ed96bddbfc--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.ja.yml@@ -0,0 +1,27 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ja:+ site_settings:+ openid_connect_enabled: OpenID Connect 認証を有効にする。ユーザーインターフェースのテキストは<a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>こちら</a>でカスタマイズしてください+ openid_connect_discovery_document: "OpenID Connect 検出ドキュメント URL。通常、'https://your.domain/.well-known/openid-configuration' にあります"+ openid_connect_client_id: "OpenID Connect クライアント ID"+ openid_connect_client_secret: "OpenID Connect クライアントシークレット"+ openid_connect_authorize_scope: "承認エンドポイントに送信されるスコープ。これには 'openid' が含まれる必要があります。"+ openid_connect_rp_initiated_logout: "ログアウト後、ユーザーを end_session_endpoint にリダイレクトする。ID プロバイダーにサポートされており、検出ドキュメントに含まれている必要があります。"+ openid_connect_rp_initiated_logout_redirect: "(オプション)ログアウトエンドポイントに渡される post_logout_redirect_uri。指定されている場合、ID プロバイダーに登録されている必要があります。"+ openid_connect_token_scope: "トークンエンドポイントをリクエストする際に送信されるスコープ。公式の仕様では、これは必要ありません。"+ openid_connect_error_redirects: "error_reason コールバックに最初のパラメーターが含まれる場合、ユーザーは 2 番目のパラメーターにある URL にリダイレクトされる"+ openid_connect_allow_association_change: "ユーザーが OpenID Connect プロバイダーから Discourse アカウントを切断して再接続することを許可する"+ openid_connect_verbose_logging: "詳細な openid-connect 認証情報を `/logs` に記録する。通常使用の場合は、これを無効にしてください。"+ openid_connect_authorize_parameters: "/auth/oidc から IDP の承認エンドポイントへのリダイレクトに含まれる URL パラメーター"+ openid_connect_overrides_email: "ログインごとに、ユーザーのメールアドレスを openid-connect 値でオーバーライドする。`auth_overrides_email` と同じように機能しますが、OpenID Connect ログインに固有です。"+ openid_connect_claims: "スコープに基づいてデータを戻さないプロバイダーで使用するための要求を明示的に定義する。(JSON)"+ openid_connect_match_by_email: "メールアドレスを使用して、OpenID Connect 認証を既存の Discourse ユーザーアカウントと照合する。"+ openid_connect_use_pkce: "OpenID Connect 認証の Proof Key for Code Exchange(PKCE)を有効にする。"+ login:+ omniauth_error:+ openid_connect_discovery_error: ID プロバイダーから構成を取得できません。もう一度お試しください。diff --git a/plugins/discourse-openid-connect/config/locales/server.ko.yml b/plugins/discourse-openid-connect/config/locales/server.ko.ymlnew file mode 100644index 00000000000..18dd77fd3ec--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.ko.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ko:diff --git a/plugins/discourse-openid-connect/config/locales/server.lt.yml b/plugins/discourse-openid-connect/config/locales/server.lt.ymlnew file mode 100644index 00000000000..16bb19758dc--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.lt.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++lt:diff --git a/plugins/discourse-openid-connect/config/locales/server.lv.yml b/plugins/discourse-openid-connect/config/locales/server.lv.ymlnew file mode 100644index 00000000000..59e0ef6f4ed--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.lv.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++lv:diff --git a/plugins/discourse-openid-connect/config/locales/server.nb_NO.yml b/plugins/discourse-openid-connect/config/locales/server.nb_NO.ymlnew file mode 100644index 00000000000..2e2224d1472--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.nb_NO.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++nb_NO:diff --git a/plugins/discourse-openid-connect/config/locales/server.nl.yml b/plugins/discourse-openid-connect/config/locales/server.nl.ymlnew file mode 100644index 00000000000..c27fe2efe63--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.nl.yml@@ -0,0 +1,27 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++nl:+ site_settings:+ openid_connect_enabled: Schakel OpenID Connect-verificatie in. Pas de gebruikersinterfacetekst <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>hier</a> aan+ openid_connect_discovery_document: "URL van OpenID Connect-detectiedocument. Normaal gesproken te vinden op 'https://jouw.domein/.well-known/openid-configuration'"+ openid_connect_client_id: "OpenID Connect-client-ID"+ openid_connect_client_secret: "OpenID Connect-clientgeheim"+ openid_connect_authorize_scope: "De bereiken die naar het autorisatie-eindpunt zijn gestuurd. Dit moet 'openid' bevatten."+ openid_connect_rp_initiated_logout: "Leid de gebruiker om naar end_session_endpoint na afmelden. Moet worden ondersteund door je identiteitsprovider en worden opgenomen in het ontdekkingsdocument."+ openid_connect_rp_initiated_logout_redirect: "(optioneel) De post_logout_redirect_uri die wordt doorgegeven aan het afmeldingseindpunt. Indien opgegeven, moet deze worden geregistreerd bij de identiteitsprovider."+ openid_connect_token_scope: "De bereiken die worden gestuurd bij verzoeken aan het tokeneindpunt. De officiële specificatie vereist dit niet."+ openid_connect_error_redirects: "Als de callback error_reason de eerste parameter bevat, wordt de gebruiker naar de URL in de tweede parameter geleid"+ openid_connect_allow_association_change: "Gebruikers toestaan hun Discourse-accounts te ontkoppelen en opnieuw te verbinden met de OpenID Connect-provider"+ openid_connect_verbose_logging: "Gedetailleerde OpenID Connect-verificatiegegevens loggen in `/logs`. Houd dit uitgeschakeld tijdens normaal gebruik."+ openid_connect_authorize_parameters: "URL-parameters die worden opgenomen in de omleiding van /auth/oidc naar het autorisatie-eindpunt van de IDP"+ openid_connect_overrides_email: "Overschrijf bij elke aanmelding het e-mailadres van de gebruiker met de waarde van OpenID Connect. Werkt hetzelfde als de instelling 'auth_overrides_email', maar is specifiek voor OpenID Connect-aanmeldingen."+ openid_connect_claims: "Definieer expliciet de claims voor gebruik met providers die geen gegevens retourneren op basis van bereiken. (JSON)"+ openid_connect_match_by_email: "E-mailadres gebruiken om OpenID Connect-verificaties te matchen met bestaande Discourse-gebruikersaccounts."+ openid_connect_use_pkce: "Schakel Proof Key for Code Exchange (PKCE) in voor OpenID Connect-verificatie."+ login:+ omniauth_error:+ openid_connect_discovery_error: Kan configuratie niet ophalen van identiteitsprovider. Probeer het opnieuw.diff --git a/plugins/discourse-openid-connect/config/locales/server.pl_PL.yml b/plugins/discourse-openid-connect/config/locales/server.pl_PL.ymlnew file mode 100644index 00000000000..a260c31c64c--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.pl_PL.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++pl_PL:diff --git a/plugins/discourse-openid-connect/config/locales/server.pt.yml b/plugins/discourse-openid-connect/config/locales/server.pt.ymlnew file mode 100644index 00000000000..298ba523c1d--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.pt.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++pt:diff --git a/plugins/discourse-openid-connect/config/locales/server.pt_BR.yml b/plugins/discourse-openid-connect/config/locales/server.pt_BR.ymlnew file mode 100644index 00000000000..f2193ecb12e--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.pt_BR.yml@@ -0,0 +1,27 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++pt_BR:+ site_settings:+ openid_connect_enabled: Ative autenticação com o OpenID Connect. Personalize o texto da interface do(a) usuário(a) <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>aqui</a>+ openid_connect_discovery_document: "URL do documento de descoberta do OpenID Connect. Geralmente localizada em \"https://your.domain/.well-known/openid-configuration\""+ openid_connect_client_id: "ID de Cliente do OpenID Connect"+ openid_connect_client_secret: "Segredo de cliente do OpenID Connect"+ openid_connect_authorize_scope: "Os escopos enviados para autorizar ponto de extremidade. Deve incluir 'openid\"."+ openid_connect_rp_initiated_logout: "Redireciona usuário(a) para end_session_endpoint após sair. Deve ser compatível com o provedor de identidade e incluso no documento de descoberta."+ openid_connect_rp_initiated_logout_redirect: "(opcional) a post_logout_redirect_uri que será passada para o ponto de extremidade de saída. Se informado, deve estar registrada com o provedor de identidade."+ openid_connect_token_scope: "Os escopos enviados ao solicitar o ponto de extremidade de token. A especificação oficial não requer isso."+ openid_connect_error_redirects: "Se callback_error_reason contiver o primeiro parâmetro, o(a) usuário(a) será redirecionado(a) à URL no segundo parâmetro"+ openid_connect_allow_association_change: "Permite que usuários(as) desconectem e reconectem suas contas do Discourse no fornecedor do OpenID Connect"+ openid_connect_verbose_logging: "Registre informações detalhadas de autenticação do openid-connect em `/logs`. Mantenha desativado ao usar normalmente."+ openid_connect_authorize_parameters: "Parâmetros da URL que serão inclusos no redirecionamento a partir de /auth/oidc para o ponto de extremidade de autorização do IDP"+ openid_connect_overrides_email: "Ao entrar todos os dias, substitua o e-mail do(a) usuário(a) pelo valor de openid-connect. Funciona igual à configuração \"auth_overrides_email\", mas é específico para entrar com OpenID Connect."+ openid_connect_claims: "Defina explicitamente as reivindicações de uso com provedores que não retornam dados de acordo com o escopo. (JSON)"+ openid_connect_match_by_email: "Use o endereço de e-mail para corresponder as autenticações do OpenID Connect às contas de usuário(a) existentes no Discourse"+ openid_connect_use_pkce: "Ative Proof Key for Code Exchange (PKCE) para a autenticação do OpenID Connect."+ login:+ omniauth_error:+ openid_connect_discovery_error: Não foi possível buscar configuração no provedor de identidade. Tente novamente.diff --git a/plugins/discourse-openid-connect/config/locales/server.ro.yml b/plugins/discourse-openid-connect/config/locales/server.ro.ymlnew file mode 100644index 00000000000..08a77f812ee--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.ro.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ro:diff --git a/plugins/discourse-openid-connect/config/locales/server.ru.yml b/plugins/discourse-openid-connect/config/locales/server.ru.ymlnew file mode 100644index 00000000000..6d00e8d4b51--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.ru.yml@@ -0,0 +1,27 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ru:+ site_settings:+ openid_connect_enabled: Включить аутентификацию OpenID Connect. Настройте текст пользовательского интерфейса <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>здесь</a>+ openid_connect_discovery_document: "URL-адрес документа обнаружения OpenID Connect. Обычно находится по адресу «https://ваш.домен/.общеизвестный/openid-configuration»"+ openid_connect_client_id: "ID клиента OpenID Connect"+ openid_connect_client_secret: "Секретный ключ клиента OpenID Connect"+ openid_connect_authorize_scope: "Области, отправленные на конечную точку авторизации. Параметр должен включать в себя «openid»."+ openid_connect_rp_initiated_logout: "Перенаправить пользователя на «end_session_endpoint» после выхода из системы. Эта функция должна поддерживаться поставщиком удостоверений и включаться в документ обнаружения."+ openid_connect_rp_initiated_logout_redirect: "(необязательно) Адрес «post_logout_redirect_uri», который будет передан в конечную точку выхода. Если он указан, он должен быть зарегистрирован у поставщика удостоверений."+ openid_connect_token_scope: "Области, отправленные при запросе конечной точки токена. Официальная спецификация этого не требует."+ openid_connect_error_redirects: "Если «callback error_reason» содержит первый параметр, пользователь будет перенаправлен на URL-адрес во втором параметре"+ openid_connect_allow_association_change: "Разрешить пользователям отключать и повторно подключать свои аккаунты Discourse к поставщику OpenID Connect"+ openid_connect_verbose_logging: "Записывать подробную информацию об аутентификации openid-connect в `/logs`. Держите эту функцию отключённой во время обычного использования."+ openid_connect_authorize_parameters: "Параметры URL-адреса, которые будут включены в перенаправление из /auth/oidc на конечную точку авторизации поставщика удостоверений"+ openid_connect_overrides_email: "Заменять электронную почту пользователя значением из «openid-connect» при каждом входе в систему. Работает так же, как параметр `auth_overrides_email`, но только при входе в систему через OpenID Connect."+ openid_connect_claims: "Явным образом определить требования для использования с поставщиками, которые не передают данные обратно, на основе областей. (JSON)"+ openid_connect_match_by_email: "Использовать адрес электронной почты для сопоставления аутентификаций OpenID Connect с существующими аккаунтами пользователей Discourse."+ openid_connect_use_pkce: "Включить Proof Key for Code Exchange (PKCE) для аутентификации OpenID Connect."+ login:+ omniauth_error:+ openid_connect_discovery_error: Не удаётся получить конфигурацию от поставщика удостоверений. Попробуйте ещё раз.diff --git a/plugins/discourse-openid-connect/config/locales/server.sk.yml b/plugins/discourse-openid-connect/config/locales/server.sk.ymlnew file mode 100644index 00000000000..6f815624081--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.sk.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++sk:diff --git a/plugins/discourse-openid-connect/config/locales/server.sl.yml b/plugins/discourse-openid-connect/config/locales/server.sl.ymlnew file mode 100644index 00000000000..23489a48b1f--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.sl.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++sl:diff --git a/plugins/discourse-openid-connect/config/locales/server.sq.yml b/plugins/discourse-openid-connect/config/locales/server.sq.ymlnew file mode 100644index 00000000000..7f051b7a7cf--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.sq.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++sq:diff --git a/plugins/discourse-openid-connect/config/locales/server.sr.yml b/plugins/discourse-openid-connect/config/locales/server.sr.ymlnew file mode 100644index 00000000000..88d63d6ae1a--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.sr.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++sr:diff --git a/plugins/discourse-openid-connect/config/locales/server.sv.yml b/plugins/discourse-openid-connect/config/locales/server.sv.ymlnew file mode 100644index 00000000000..ec46cf8dea4--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.sv.yml@@ -0,0 +1,25 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++sv:+ site_settings:+ openid_connect_enabled: Aktivera OpenID Connect-autentisering. Anpassa användargränssnittets text <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>här</a>+ openid_connect_discovery_document: "Webbadress för OpenID Connect-identifieringsdokument. Finns normalt på 'https://your.domain/.well-known/openid-configuration'"+ openid_connect_client_id: "OpenID Connect-klient-ID"+ openid_connect_client_secret: "OpenID Connect-klienthemlighet"+ openid_connect_authorize_scope: "Omfången som skickas till auktoriseringsslutpunkten. Detta måste innehålla 'openid'."+ openid_connect_rp_initiated_logout: "Omdirigera användaren till end_session_endpoint efter utloggning. Måste stödjas av din identitetsleverantör och ingå i identifieringsdokumentet."+ openid_connect_rp_initiated_logout_redirect: "(valfritt) Post_logout_redirect_uri som kommer att skickas till utloggningsslutpunkten. Om den tillhandahålls måste den registreras hos identitetsleverantören."+ openid_connect_token_scope: "De omfång som skickas när du begär tokenslutpunkten. Den officiella specifikationen kräver inte detta."+ openid_connect_error_redirects: "Om callback error_reason innehåller den första parametern kommer användaren att omdirigeras till URL:en i den andra parametern"+ openid_connect_allow_association_change: "Tillåt att användare kopplar från och återansluter sina Discourse-konton hos OpenID Connect-leverantören"+ openid_connect_verbose_logging: "Logga detaljerad openid-connect-autentiseringsinformation i `/logs`. Låt detta förbli inaktiverat under normal användning."+ openid_connect_authorize_parameters: "URL-parametrar som kommer att omfattas i omdirigeringen från /auth/oidc till IDP:ns auktoriseringsslutpunkt"+ openid_connect_overrides_email: "Vid varje inloggning, åsidosätt användarens e-postadress med hjälp av värdet för openid-connect. Fungerar precis som inställningen 'auth_overrides_email', men är specifik för OpenID Connect-inloggningar."+ openid_connect_claims: "Definiera uttryckligen kraven för användning av leverantörer som inte skickar tillbaka data baserat på omfång. (JSON)"+ login:+ omniauth_error:+ openid_connect_discovery_error: Det gick inte att hämta konfigurationen från identitetsleverantören. Försök igen.diff --git a/plugins/discourse-openid-connect/config/locales/server.sw.yml b/plugins/discourse-openid-connect/config/locales/server.sw.ymlnew file mode 100644index 00000000000..0d7cdd075bf--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.sw.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++sw:diff --git a/plugins/discourse-openid-connect/config/locales/server.te.yml b/plugins/discourse-openid-connect/config/locales/server.te.ymlnew file mode 100644index 00000000000..03967bdbb07--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.te.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++te:diff --git a/plugins/discourse-openid-connect/config/locales/server.th.yml b/plugins/discourse-openid-connect/config/locales/server.th.ymlnew file mode 100644index 00000000000..7de85ff91c4--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.th.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++th:diff --git a/plugins/discourse-openid-connect/config/locales/server.tr_TR.yml b/plugins/discourse-openid-connect/config/locales/server.tr_TR.ymlnew file mode 100644index 00000000000..5476367069d--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.tr_TR.yml@@ -0,0 +1,27 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++tr_TR:+ site_settings:+ openid_connect_enabled: OpenID Connect kimlik doğrulamasını etkinleştirin. Kullanıcı arayüzü metnini <a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>buradan</a> özelleştirin+ openid_connect_discovery_document: "OpenID Connect keşif belgesi URL'si. Normalde \"https://your.domain/.well-known/openid-configuration\" adresinde bulunur"+ openid_connect_client_id: "OpenID Connect istemci kimliği"+ openid_connect_client_secret: "OpenID Connect istemci sırrı"+ openid_connect_authorize_scope: "Yetkilendirme uç noktasına gönderilen kapsamlar. Bu, \"openid\" içermelidir."+ openid_connect_rp_initiated_logout: "Çıkış yaptıktan sonra kullanıcıyı end_session_endpoint'e yönlendirin. Kimlik sağlayıcınız tarafından desteklenmeli ve keşif belgesine dahil edilmelidir."+ openid_connect_rp_initiated_logout_redirect: "(isteğe bağlı) Çıkış yap uç noktasına iletilecek olan post_logout_redirect_uri. Sağlanmışsa kimlik sağlayıcı ile kayıtlı olmalıdır."+ openid_connect_token_scope: "Belirteç uç noktası talep edilirken gönderilen kapsamlar. Resmi spesifikasyon bunu gerektirmez."+ openid_connect_error_redirects: "Geri arama error_reason ilk parametreyi içeriyorsa kullanıcı ikinci parametredeki URL'ye yönlendirilir"+ openid_connect_allow_association_change: "Kullanıcıların Discourse hesaplarının bağlantısını OpenID Connect sağlayıcısından kesmelerine ve yeniden bağlamalarına izin verin"+ openid_connect_verbose_logging: "Ayrıntılı openid-connect kimlik doğrulama bilgilerini \"/logs\" dosyasına kaydedin. Normal kullanım sırasında bunu devre dışı bırakın."+ openid_connect_authorize_parameters: "auth/oidc'den IDP'nin yetkilendirme uç noktasına yönlendirmeye dahil edilecek URL parametreleri"+ openid_connect_overrides_email: "Her oturum açma işleminde, openid-connect değerini kullanarak kullanıcının e-postasını geçersiz kılın. \"auth_overrides_email\" ayarıyla aynı şekilde çalışır, ancak OpenID Connect girişlerine özeldir."+ openid_connect_claims: "Kapsamlara dayalı olarak verileri geri iletmeyen sağlayıcılarla kullanım için talepleri açıkça tanımlayın. (JSON)"+ openid_connect_match_by_email: "OpenID Connect kimlik doğrulamalarını mevcut Discourse kullanıcı hesaplarıyla eşleştirmek için e-posta adresini kullanın."+ openid_connect_use_pkce: "OpenID Connect kimlik doğrulaması için Kod Değişimi Kanıt Anahtarını (PKCE) etkinleştirin."+ login:+ omniauth_error:+ openid_connect_discovery_error: Kimlik sağlayıcıdan yapılandırma alınamıyor. Lütfen tekrar deneyin.diff --git a/plugins/discourse-openid-connect/config/locales/server.ug.yml b/plugins/discourse-openid-connect/config/locales/server.ug.ymlnew file mode 100644index 00000000000..a6bf0185ae2--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.ug.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ug:diff --git a/plugins/discourse-openid-connect/config/locales/server.uk.yml b/plugins/discourse-openid-connect/config/locales/server.uk.ymlnew file mode 100644index 00000000000..f1390545d1d--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.uk.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++uk:diff --git a/plugins/discourse-openid-connect/config/locales/server.ur.yml b/plugins/discourse-openid-connect/config/locales/server.ur.ymlnew file mode 100644index 00000000000..b4a9c21ee2f--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.ur.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++ur:diff --git a/plugins/discourse-openid-connect/config/locales/server.vi.yml b/plugins/discourse-openid-connect/config/locales/server.vi.ymlnew file mode 100644index 00000000000..f629dcf5329--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.vi.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++vi:diff --git a/plugins/discourse-openid-connect/config/locales/server.zh_CN.yml b/plugins/discourse-openid-connect/config/locales/server.zh_CN.ymlnew file mode 100644index 00000000000..9c830c86368--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.zh_CN.yml@@ -0,0 +1,27 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++zh_CN:+ site_settings:+ openid_connect_enabled: 启用 OpenID Connect 身份验证。在<a href='%{base_path}/admin/customize/site_texts?q=js.login.oidc'>此处</a>自定义用户界面文本+ openid_connect_discovery_document: "OpenID Connect 发现文档 URL。通常位于 'https://your.domain/.well-known/openid-configuration' 下"+ openid_connect_client_id: "OpenID Connect 客户端 ID"+ openid_connect_client_secret: "OpenID Connect 客户端密钥"+ openid_connect_authorize_scope: "发送到授权端点的范围。必须包含“openid”。"+ openid_connect_rp_initiated_logout: "退出登录后将用户重定向到 end_session_endpoint。必须受到您的身份提供商的支持并附于发现文档中。"+ openid_connect_rp_initiated_logout_redirect: "(可选)将被传递到退出登录端点的 post_logout_redirect_uri。如果提供,则必须向身份提供商注册。"+ openid_connect_token_scope: "请求令牌端点时发送的范围。官方规范不需要。"+ openid_connect_error_redirects: "如果回调 error_reason 包含第一个参数,用户将被重定向到第二个参数中的 URL"+ openid_connect_allow_association_change: "允许用户从 OpenID Connect 提供商断开并重新连接其 Discourse 帐户"+ openid_connect_verbose_logging: "将详细的 openid-connect 身份验证信息记录到 `/logs`。常规使用期间应保持禁用。"+ openid_connect_authorize_parameters: "从 /auth/oidc 到 IDP 授权端点的重定向中将包含的 URL 参数"+ openid_connect_overrides_email: "每次登录时,使用 openid-connect 值覆盖用户的电子邮件。工作原理与 `auth_overrides_email` 设置相同,但特定于 OpenID Connect 登录。"+ openid_connect_claims: "明确定义声明以用于不基于范围传回数据的提供商。(JSON)"+ openid_connect_match_by_email: "使用电子邮件地址将 OpenID Connect 身份验证与现有 Discourse 用户帐户相匹配。"+ openid_connect_use_pkce: "为 OpenID Connect 身份验证启用代码交换验证密钥 (PKCE)。"+ login:+ omniauth_error:+ openid_connect_discovery_error: 无法从身份提供商获取配置。请重试。diff --git a/plugins/discourse-openid-connect/config/locales/server.zh_TW.yml b/plugins/discourse-openid-connect/config/locales/server.zh_TW.ymlnew file mode 100644index 00000000000..7e15fab0018--- /dev/null+++ b/plugins/discourse-openid-connect/config/locales/server.zh_TW.yml@@ -0,0 +1,7 @@+# WARNING: Never edit this file.+# It will be overwritten when translations are pulled from Crowdin.+#+# To work with us on translations, join this project:+# https://translate.discourse.org/++zh_TW:diff --git a/plugins/discourse-openid-connect/config/settings.yml b/plugins/discourse-openid-connect/config/settings.ymlnew file mode 100644index 00000000000..2452fc760b9--- /dev/null+++ b/plugins/discourse-openid-connect/config/settings.yml@@ -0,0 +1,39 @@+discourse_openid_connect:+ openid_connect_enabled:+ default: false+ openid_connect_discovery_document:+ default: ""+ openid_connect_client_id:+ default: ""+ openid_connect_client_secret:+ default: ""+ secret: true+ openid_connect_rp_initiated_logout:+ default: false+ openid_connect_rp_initiated_logout_redirect:+ default: ""+ openid_connect_allow_association_change:+ default: false+ openid_connect_overrides_email:+ default: false+ openid_connect_authorize_scope:+ default: "openid"+ openid_connect_verbose_logging:+ default: false+ openid_connect_token_scope:+ default: ""+ openid_connect_error_redirects:+ default: ""+ type: list+ list_type: secret+ openid_connect_authorize_parameters:+ default: ""+ type: list+ list_type: compact+ openid_connect_claims:+ default: ""+ textarea: true+ openid_connect_match_by_email:+ default: true+ openid_connect_use_pkce:+ default: falsediff --git a/plugins/discourse-openid-connect/lib/omniauth_open_id_connect.rb b/plugins/discourse-openid-connect/lib/omniauth_open_id_connect.rbnew file mode 100644index 00000000000..22cdd10f680--- /dev/null+++ b/plugins/discourse-openid-connect/lib/omniauth_open_id_connect.rb@@ -0,0 +1,251 @@+# frozen_string_literal: true++require "omniauth-oauth2"++module ::OmniAuth+ module OpenIDConnect+ class DiscoveryError < Error+ end+ end++ module Strategies+ class OpenIDConnect < OmniAuth::Strategies::OAuth2+ class NonceVerifyError < StandardError+ end+ class SubVerifyError < StandardError+ end++ option :scope, "openid"+ option :discovery, true+ option :discovery_document, nil+ option :use_userinfo, true+ option :error_handler, lambda { |error, message| nil } # Default no-op handler+ option :verbose_logger, lambda { |message| nil } # Default no-op handler+ option :passthrough_authorize_options, [:p]+ option :passthrough_token_options, [:p]+ option :claims, nil++ option :client_options,+ site: nil,+ authorize_url: nil,+ token_url: nil,+ userinfo_endpoint: nil,+ auth_scheme: :basic_auth++ def verbose_log(message)+ options.verbose_logger.call(message)+ end++ def discover!+ discovery_document = options[:discovery_document]+ if discovery_document.nil?+ raise ::OmniAuth::OpenIDConnect::DiscoveryError.new("Discovery document is missing")+ end++ discovery_params = {+ authorize_url: "authorization_endpoint",+ token_url: "token_endpoint",+ site: "issuer",+ }++ discovery_params.each do |internal_key, external_key|+ val = discovery_document[external_key]+ if val.nil? || val.empty?+ raise ::OmniAuth::OpenIDConnect::DiscoveryError.new(+ "missing discovery parameter #{external_key}",+ )+ end+ options[:client_options][internal_key] = val+ end++ userinfo_endpoint =+ options[:client_options][:userinfo_endpoint] = discovery_document[+ "userinfo_endpoint"+ ].to_s+ options.use_userinfo = false if userinfo_endpoint.nil? || userinfo_endpoint.empty?++ if discovery_document["token_endpoint_auth_methods_supported"] &&+ !discovery_document["token_endpoint_auth_methods_supported"].include?(+ "client_secret_basic",+ ) &&+ discovery_document["token_endpoint_auth_methods_supported"].include?(+ "client_secret_post",+ )+ options[:client_options][:auth_scheme] = :request_body+ end+ end++ def request_phase+ begin+ discover! if options[:discovery]+ rescue ::OmniAuth::OpenIDConnect::DiscoveryError => e+ return fail!(:openid_connect_discovery_error, e)+ end++ super+ end++ def authorize_params+ super.tap do |params|+ options[:passthrough_authorize_options].each do |k|+ params[k] = request.params[k.to_s] if [nil, ""].exclude?(request.params[k.to_s])+ end++ params[:claims] = options[:claims] if options[:claims].present?++ params[:scope] = options[:scope]+ session["omniauth.nonce"] = params[:nonce] = SecureRandom.hex(32)++ options[:passthrough_token_options].each do |k|+ session["omniauth.param.#{k}"] = request.params[k.to_s] if [nil, ""].exclude?(+ request.params[k.to_s],+ )+ end+ end+ end++ def token_params+ params = {}+ options[:passthrough_token_options].each do |k|+ val = session.delete("omniauth.param.#{k}")+ params[k] = val if [nil, ""].exclude?(val)+ end+ super.merge(params)+ end++ def callback_phase+ if request.params["error"] && request.params["error_description"] &&+ response =+ options.error_handler.call(+ request.params["error"],+ request.params["error_description"],+ )+ verbose_log("Error handled, redirecting\n\n#{response.to_yaml}")+ return redirect(response)+ end++ begin+ discover! if options[:discovery]++ oauth2_callback_phase = super+ return oauth2_callback_phase if env["omniauth.error"]++ oauth2_callback_phase+ rescue ::OmniAuth::OpenIDConnect::DiscoveryError => e+ fail!(:openid_connect_discovery_error, e)+ rescue ::JWT::DecodeError => e+ fail!(:jwt_decode_failed, e)+ rescue NonceVerifyError => e+ fail!(:jwt_nonce_verify_failed, e)+ rescue SubVerifyError => e+ fail!(:openid_connect_sub_mismatch, e)+ end+ end++ def id_token_info+ # Verify the claims in the JWT+ # The signature does not need to be verified because the+ # token was acquired via a direct server-server connection to the issuer+ @id_token_info ||=+ begin+ decoded = ::JWT.decode(access_token["id_token"], nil, false).first+ verbose_log("Loaded JWT\n\n#{decoded.to_yaml}")+ ::JWT::Verify.verify_claims(+ decoded,+ verify_iss: true,+ iss: options[:client_options][:site],+ verify_aud: true,+ aud: options.client_id,+ verify_sub: false,+ verify_expiration: true,+ verify_not_before: true,+ verify_iat: false,+ verify_jti: false,+ )++ if decoded["nonce"].nil? || decoded["nonce"].empty? ||+ decoded["nonce"] != session.delete("omniauth.nonce")+ raise NonceVerifyError.new "JWT nonce is missing, or does not match"+ end++ verbose_log("Verified JWT\n\n#{decoded.to_yaml}")++ decoded+ end+ end++ def userinfo_response+ @raw_info ||=+ begin+ info = access_token.get(options[:client_options][:userinfo_endpoint]).parsed+ verbose_log("Fetched userinfo response\n\n#{info.to_yaml}")+ info+ end++ userinfo_sub = @raw_info["sub"]+ id_token_sub = id_token_info["sub"]+ if userinfo_sub != id_token_sub+ raise SubVerifyError.new(+ "OIDC `sub` mismatch. ID Token value: #{id_token_sub.inspect}. UserInfo value: #{userinfo_sub.inspect}",+ )+ end+ @raw_info+ end++ uid { id_token_info["sub"] }++ info do+ data_source = options.use_userinfo ? userinfo_response : id_token_info+ prune!(+ name: data_source["name"],+ email: data_source["email"],+ first_name: data_source["given_name"],+ last_name: data_source["family_name"],+ nickname: data_source["preferred_username"],+ image: data_source["picture"],+ )+ end++ extra do+ hash = {}+ hash[:raw_info] = options.use_userinfo ? userinfo_response : id_token_info+ hash[:id_token] = access_token["id_token"]+ prune! hash+ end++ private++ def callback_url+ full_host + script_name + callback_path+ end++ def get_token_options+ {+ redirect_uri: callback_url,+ grant_type: "authorization_code",+ code: request.params["code"],+ client_id: options[:client_id],+ client_secret: options[:client_secret],+ }.merge(token_params.to_hash(symbolize_keys: true))+ end++ def prune!(hash)+ hash.delete_if do |_, v|+ prune!(v) if v.is_a?(Hash)+ v.nil? || (v.respond_to?(:empty?) && v.empty?)+ end+ end++ protected++ def build_access_token+ return super if options.use_userinfo+ response =+ client.request(:post, options[:client_options][:token_url], body: get_token_options)+ ::OAuth2::AccessToken.from_hash(client, response.parsed)+ end+ end+ end+end++OmniAuth.config.add_camelization "openid_connect", "OpenIDConnect"diff --git a/plugins/discourse-openid-connect/lib/openid_connect_authenticator.rb b/plugins/discourse-openid-connect/lib/openid_connect_authenticator.rbnew file mode 100644index 00000000000..7bb870a3e07--- /dev/null+++ b/plugins/discourse-openid-connect/lib/openid_connect_authenticator.rb@@ -0,0 +1,152 @@+# frozen_string_literal: true+require "base64"+require "openssl"++class OpenIDConnectAuthenticator < Auth::ManagedAuthenticator+ def name+ "oidc"+ end++ def can_revoke?+ SiteSetting.openid_connect_allow_association_change+ end++ def can_connect_existing_user?+ SiteSetting.openid_connect_allow_association_change+ end++ def enabled?+ SiteSetting.openid_connect_enabled+ end++ def primary_email_verified?(auth)+ supplied_verified_boolean = auth["extra"]["raw_info"]["email_verified"]+ # If the payload includes the email_verified boolean, use it. Otherwise assume true+ if supplied_verified_boolean.nil?+ true+ else+ # Many providers violate the spec, and send this as a string rather than a boolean+ supplied_verified_boolean == true ||+ (supplied_verified_boolean.is_a?(String) && supplied_verified_boolean.downcase == "true")+ end+ end++ def always_update_user_email?+ SiteSetting.openid_connect_overrides_email+ end++ def match_by_email+ SiteSetting.openid_connect_match_by_email+ end++ def discovery_document+ document_url = SiteSetting.openid_connect_discovery_document.presence+ if !document_url+ oidc_log("No discovery document URL specified", error: true)+ return+ end++ from_cache = true+ result =+ Discourse+ .cache+ .fetch("openid-connect-discovery-#{document_url}", expires_in: 10.minutes) do+ from_cache = false+ oidc_log("Fetching discovery document from #{document_url}")+ connection =+ Faraday.new(request: { timeout: request_timeout_seconds }) do |c|+ c.use Faraday::Response::RaiseError+ c.adapter FinalDestination::FaradayAdapter+ end+ JSON.parse(connection.get(document_url).body)+ rescue Faraday::Error, JSON::ParserError => e+ oidc_log("Fetching discovery document raised error #{e.class} #{e.message}", error: true)+ nil+ end++ oidc_log("Discovery document loaded from cache") if from_cache+ oidc_log("Discovery document is\n\n#{result.to_yaml}")++ result+ end++ def oidc_log(message, error: false)+ if error+ Rails.logger.error("OIDC Log: #{message}")+ elsif SiteSetting.openid_connect_verbose_logging+ Rails.logger.warn("OIDC Log: #{message}")+ end+ end++ def register_middleware(omniauth)+ omniauth.provider :openid_connect,+ name: :oidc,+ error_handler:+ lambda { |error, message|+ handlers = SiteSetting.openid_connect_error_redirects.split("\n")+ handlers.each do |row|+ parts = row.split("|")+ return parts[1] if message.include? parts[0]+ end+ nil+ },+ verbose_logger: lambda { |message| oidc_log(message) },+ setup:+ lambda { |env|+ opts = env["omniauth.strategy"].options++ token_params = {}+ token_params[+ :scope+ ] = SiteSetting.openid_connect_token_scope if SiteSetting.openid_connect_token_scope.present?++ opts.deep_merge!(+ client_id: SiteSetting.openid_connect_client_id,+ client_secret: SiteSetting.openid_connect_client_secret,+ discovery_document: discovery_document,+ scope: SiteSetting.openid_connect_authorize_scope,+ token_params: token_params,+ passthrough_authorize_options:+ SiteSetting.openid_connect_authorize_parameters.split("|"),+ claims: SiteSetting.openid_connect_claims,+ pkce: SiteSetting.openid_connect_use_pkce,+ pkce_options: {+ code_verifier: -> { generate_code_verifier },+ code_challenge: ->(code_verifier) do+ generate_code_challenge(code_verifier)+ end,+ code_challenge_method: "S256",+ },+ )++ opts[:client_options][:connection_opts] = {+ request: {+ timeout: request_timeout_seconds,+ },+ }++ opts[:client_options][:connection_build] = lambda do |builder|+ if SiteSetting.openid_connect_verbose_logging+ builder.response :logger,+ Rails.logger,+ { bodies: true, formatter: OIDCFaradayFormatter }+ end++ builder.request :url_encoded # form-encode POST params+ builder.adapter FinalDestination::FaradayAdapter # make requests with FinalDestination::HTTP+ end+ }+ end++ def generate_code_verifier+ Base64.urlsafe_encode64(OpenSSL::Random.random_bytes(32)).tr("=", "")+ end++ def generate_code_challenge(code_verifier)+ Base64.urlsafe_encode64(Digest::SHA256.digest(code_verifier)).tr("+/", "-_").tr("=", "")+ end++ def request_timeout_seconds+ GlobalSetting.openid_connect_request_timeout_seconds+ end+enddiff --git a/plugins/discourse-openid-connect/lib/openid_connect_faraday_formatter.rb b/plugins/discourse-openid-connect/lib/openid_connect_faraday_formatter.rbnew file mode 100644index 00000000000..96c4e2968fe--- /dev/null+++ b/plugins/discourse-openid-connect/lib/openid_connect_faraday_formatter.rb@@ -0,0 +1,27 @@+# frozen_string_literal: true++require "faraday/logging/formatter"++class OIDCFaradayFormatter < Faraday::Logging::Formatter+ def request(env)+ warn <<~LOG+ OIDC Debugging: request #{env.method.upcase} #{env.url}++ Headers: #{env.request_headers}++ Body: #{env[:body]}+ LOG+ end++ def response(env)+ warn <<~LOG+ OIDC Debugging: response status #{env.status}++ From #{env.method.upcase} #{env.url}++ Headers: #{env.response_headers}++ Body: #{env[:body]}+ LOG+ end+enddiff --git a/plugins/discourse-openid-connect/plugin.rb b/plugins/discourse-openid-connect/plugin.rbnew file mode 100644index 00000000000..475ce802a84--- /dev/null+++ b/plugins/discourse-openid-connect/plugin.rb@@ -0,0 +1,64 @@+# frozen_string_literal: true++# name: discourse-openid-connect+# about: Allows users to login to your forum using an OpenID Connect provider as authentication.+# meta_topic_id: 103632+# version: 1.0+# authors: David Taylor+# url: https://github.com/discourse/discourse/tree/main/plugins/discourse-openid-connect++enabled_site_setting :openid_connect_enabled++require_relative "lib/openid_connect_faraday_formatter"+require_relative "lib/omniauth_open_id_connect"+require_relative "lib/openid_connect_authenticator"++GlobalSetting.add_default :openid_connect_request_timeout_seconds, 10++# RP-initiated logout+# https://openid.net/specs/openid-connect-rpinitiated-1_0.html+on(:before_session_destroy) do |data|+ next if !SiteSetting.openid_connect_rp_initiated_logout++ authenticator = OpenIDConnectAuthenticator.new++ oidc_record = data[:user]&.user_associated_accounts&.find_by(provider_name: "oidc")+ if !oidc_record+ authenticator.oidc_log "Logout: No oidc user_associated_account record for user"+ next+ end++ token = oidc_record.extra["id_token"]+ if !token+ authenticator.oidc_log "Logout: No oidc id_token in user_associated_account record"+ next+ end++ end_session_endpoint = authenticator.discovery_document["end_session_endpoint"].presence+ if !end_session_endpoint+ authenticator.oidc_log "Logout: No end_session_endpoint found in discovery document",+ error: true+ next+ end++ begin+ uri = URI.parse(end_session_endpoint)+ rescue URI::Error+ authenticator.oidc_log "Logout: unable to parse end_session_endpoint #{end_session_endpoint}",+ error: true+ end++ authenticator.oidc_log "Logout: Redirecting user_id=#{data[:user].id} to end_session_endpoint"++ params = URI.decode_www_form(String(uri.query))++ params << ["id_token_hint", token]++ post_logout_redirect = SiteSetting.openid_connect_rp_initiated_logout_redirect.presence+ params << ["post_logout_redirect_uri", post_logout_redirect] if post_logout_redirect++ uri.query = URI.encode_www_form(params)+ data[:redirect_url] = uri.to_s+end++auth_provider authenticator: OpenIDConnectAuthenticator.newdiff --git a/plugins/discourse-openid-connect/spec/lib/omniauth_open_id_connect_spec.rb b/plugins/discourse-openid-connect/spec/lib/omniauth_open_id_connect_spec.rbnew file mode 100644index 00000000000..cb1d42c94a4--- /dev/null+++ b/plugins/discourse-openid-connect/spec/lib/omniauth_open_id_connect_spec.rb@@ -0,0 +1,257 @@+# frozen_string_literal: true++require_relative "../../lib/omniauth_open_id_connect"+require "rails_helper"++describe OmniAuth::Strategies::OpenIDConnect do+ subject(:strategy) do+ OmniAuth::Strategies::OpenIDConnect.new(+ app,+ "appid",+ "secret",+ discovery_document: discovery_document,+ )+ end++ let(:app) do+ @app_called = false+ lambda do |*args|+ @app_called = true+ [200, {}, ["Hello."]]+ end+ end++ let(:discovery_document) do+ {+ "issuer" => "https://id.example.com/",+ "authorization_endpoint" => "https://id.example.com/authorize",+ "token_endpoint" => "https://id.example.com/token",+ "userinfo_endpoint" => "https://id.example.com/userinfo",+ }+ end++ before { OmniAuth.config.test_mode = true }++ after { OmniAuth.config.test_mode = false }++ context "when discovery document is missing" do+ let(:discovery_document) { nil }++ it "throws an error" do+ expect { strategy.discover! }.to raise_error(::OmniAuth::OpenIDConnect::DiscoveryError)+ end+ end++ it "throws error for invalid discovery document" do+ discovery_document.delete("authorization_endpoint")+ expect { strategy.discover! }.to raise_error(::OmniAuth::OpenIDConnect::DiscoveryError)+ end++ it "disables userinfo if not included in discovery document" do+ discovery_document.delete("userinfo_endpoint")+ strategy.discover!+ expect(strategy.options.use_userinfo).to eq(false)+ end++ it "uses basic authentication when no endpoint auth methods are provided" do+ strategy.discover!+ expect(strategy.options.client_options.auth_scheme).to eq(:basic_auth)+ end++ it "uses basic authentication when both client_secret_basic and client_secret_post are provided" do+ discovery_document.merge!(+ { "token_endpoint_auth_methods_supported" => %w[client_secret_basic client_secret_post] },+ )+ strategy.discover!+ expect(strategy.options.client_options.auth_scheme).to eq(:basic_auth)+ end++ it "uses request_body authentication when client_secret_post is provided only" do+ discovery_document.merge!({ "token_endpoint_auth_methods_supported" => ["client_secret_post"] })+ strategy.discover!+ expect(strategy.options.client_options.auth_scheme).to eq(:request_body)+ end++ context "with valid discovery document loaded" do+ before do+ strategy.stubs(:request).returns(mock("object"))+ strategy+ .request+ .stubs(:params)+ .returns("p" => "someallowedvalue", "somethingelse" => "notallowed")+ strategy.options.claims = '{"userinfo":{"email":null,"email_verified":null}'+ strategy.discover!+ end++ it "loads parameters correctly" do+ expect(strategy.options.client_options.site).to eq("https://id.example.com/")+ expect(strategy.options.client_options.authorize_url).to eq(+ "https://id.example.com/authorize",+ )+ expect(strategy.options.client_options.token_url).to eq("https://id.example.com/token")+ expect(strategy.options.client_options.userinfo_endpoint).to eq(+ "https://id.example.com/userinfo",+ )+ end++ describe "authorize parameters" do+ it "passes through allowed parameters" do+ expect(strategy.authorize_params[:p]).to eq("someallowedvalue")+ expect(strategy.authorize_params[:somethingelse]).to eq(nil)++ expect(strategy.session["omniauth.param.p"]).to eq("someallowedvalue")+ end++ it "sets a nonce" do+ expect((nonce = strategy.authorize_params[:nonce]).size).to eq(64)+ expect(strategy.session["omniauth.nonce"]).to eq(nonce)+ end++ it "passes claims through to authorize endpoint if present" do+ expect(strategy.authorize_params[:claims]).to eq(+ '{"userinfo":{"email":null,"email_verified":null}',+ )+ end++ it "does not pass claims if empty string" do+ strategy.options.claims = ""+ expect(strategy.authorize_params[:claims]).to eq(nil)+ end+ end++ describe "token parameters" do+ it "passes through parameters from authorize phase" do+ expect(strategy.authorize_params[:p]).to eq("someallowedvalue")+ strategy.stubs(:request).returns(mock)+ strategy.request.stubs(:params).returns({})+ expect(strategy.token_params[:p]).to eq("someallowedvalue")+ end+ end++ describe "callback_phase" do+ before do+ auth_params = strategy.authorize_params++ strategy.stubs(:full_host).returns("https://example.com")++ strategy.stubs(:request).returns(mock)+ strategy+ .request+ .stubs(:params)+ .returns("state" => auth_params[:state], "code" => "supersecretcode")++ payload = {+ iss: "https://id.example.com/",+ sub: "someuserid",+ aud: "appid",+ iat: Time.now.to_i - 30,+ exp: Time.now.to_i + 120,+ nonce: auth_params[:nonce],+ name: "My Auth Token Name",+ email: "[email protected]",+ }+ @token = ::JWT.encode payload, nil, "none"+ end++ it "handles error redirects correctly" do+ strategy.stubs(:request).returns(mock)+ strategy+ .request+ .stubs(:params)+ .returns("error" => true, "error_description" => "User forgot password")+ strategy.options.error_handler =+ lambda do |error, message|+ "https://example.com/error_redirect" if message.include?("forgot password")+ end+ expect(strategy.callback_phase[0]).to eq(302)+ expect(strategy.callback_phase[1]["Location"]).to eq("https://example.com/error_redirect")+ expect(@app_called).to eq(false)+ end++ context "with userinfo disabled" do+ before do+ stub_request(:post, "https://id.example.com/token").with(+ body: hash_including("code" => "supersecretcode", "p" => "someallowedvalue"),+ ).to_return(+ status: 200,+ body: { id_token: @token }.to_json,+ headers: {+ "Content-Type" => "application/json",+ },+ )++ strategy.options.use_userinfo = false+ end++ it "fetches auth token correctly, and uses it for user info" do+ expect(strategy.callback_phase[0]).to eq(200)+ expect(strategy.uid).to eq("someuserid")+ expect(strategy.info[:name]).to eq("My Auth Token Name")+ expect(strategy.info[:email]).to eq("[email protected]")+ expect(strategy.extra[:id_token]).to eq(@token)+ expect(@app_called).to eq(true)+ end++ it "checks the nonce" do+ strategy.session["omniauth.nonce"] = "overriddenNonce"+ expect(strategy.callback_phase[0]).to eq(302)+ expect(@app_called).to eq(false)+ end++ it "checks the issuer" do+ strategy.options.client_id = "overriddenclientid"+ expect(strategy.callback_phase[0]).to eq(302)+ expect(@app_called).to eq(false)+ end+ end++ context "with userinfo enabled" do+ let(:userinfo_response) do+ { sub: "someuserid", name: "My Userinfo Name", email: "[email protected]" }+ end++ before do+ stub_request(:post, "https://id.example.com/token").with(+ body: hash_including("code" => "supersecretcode", "p" => "someallowedvalue"),+ ).to_return(+ status: 200,+ body: { access_token: "AnAccessToken", expires_in: 3600, id_token: @token }.to_json,+ headers: {+ "Content-Type" => "application/json",+ },+ )++ stub_request(:get, "https://id.example.com/userinfo")+ .with(headers: { "Authorization" => "Bearer AnAccessToken" })+ .to_return do |request|+ {+ status: 200,+ body: userinfo_response.to_json,+ headers: {+ "Content-Type" => "application/json",+ },+ }+ end+ end++ it "fetches credentials and auth token correctly" do+ expect(strategy.callback_phase[0]).to eq(200)+ expect(strategy.uid).to eq("someuserid")+ expect(strategy.info[:name]).to eq("My Userinfo Name")+ expect(strategy.info[:email]).to eq("[email protected]")+ expect(@app_called).to eq(true)+ end++ it "handles mismatching `sub` correctly" do+ userinfo_response["sub"] = "someothersub"+ callback_response = strategy.callback_phase+ expect(callback_response[0]).to eq(302)+ expect(callback_response[1]["Location"]).to eq(+ "/auth/failure?message=openid_connect_sub_mismatch&strategy=openidconnect",+ )+ expect(@app_called).to eq(false)+ end+ end+ end+ end+enddiff --git a/plugins/discourse-openid-connect/spec/lib/openid_connect_authenticator_spec.rb b/plugins/discourse-openid-connect/spec/lib/openid_connect_authenticator_spec.rbnew file mode 100644index 00000000000..28d06cfa975--- /dev/null+++ b/plugins/discourse-openid-connect/spec/lib/openid_connect_authenticator_spec.rb@@ -0,0 +1,132 @@+# frozen_string_literal: true++require "rails_helper"+require_relative "../../lib/omniauth_open_id_connect"++describe OpenIDConnectAuthenticator do+ let(:authenticator) { described_class.new }+ fab!(:user)+ let(:hash) do+ OmniAuth::AuthHash.new(+ provider: "oidc",+ uid: "123456789",+ info: {+ name: "John Doe",+ email: user.email,+ },+ extra: {+ raw_info: {+ email: user.email,+ name: "John Doe",+ },+ },+ )+ end++ context "when email_verified is not supplied" do+ # Some IDPs do not supply this information+ # In this case we trust that they have verified the address+ it "matches the user" do+ result = authenticator.after_authenticate(hash)++ expect(result.user).to eq(user)+ end+ end++ context "when email_verified is true" do+ it "matches the user" do+ hash[:extra][:raw_info][:email_verified] = true+ result = authenticator.after_authenticate(hash)+ expect(result.user).to eq(user)+ end++ it "matches the user as a true string" do+ hash[:extra][:raw_info][:email_verified] = "true"+ result = authenticator.after_authenticate(hash)+ expect(result.user).to eq(user)+ end++ it "matches the user as a titlecase true string" do+ hash[:extra][:raw_info][:email_verified] = "True"+ result = authenticator.after_authenticate(hash)+ expect(result.user).to eq(user)+ end+ end++ context "when email_verified is false" do+ it "does not match the user" do+ hash[:extra][:raw_info][:email_verified] = false+ result = authenticator.after_authenticate(hash)+ expect(result.user).to eq(nil)+ end++ it "does not match the user as a false string" do+ hash[:extra][:raw_info][:email_verified] = "false"+ result = authenticator.after_authenticate(hash)+ expect(result.user).to eq(nil)+ end+ end++ context "when match_by_email is false" do+ it "does not match the user" do+ SiteSetting.openid_connect_match_by_email = false+ result = authenticator.after_authenticate(hash)+ expect(result.user).to eq(nil)+ end+ end++ describe "discovery document fetching" do+ let(:document_url) do+ SiteSetting.openid_connect_discovery_document =+ "https://id.example.com/.well-known/openid-configuration"+ end+ let(:document) do+ {+ issuer: "https://id.example.com/",+ authorization_endpoint: "https://id.example.com/authorize",+ token_endpoint: "https://id.example.com/token",+ userinfo_endpoint: "https://id.example.com/userinfo",+ }.to_json+ end+ after { Discourse.cache.delete("openid-connect-discovery-#{document_url}") }++ it "loads the document correctly" do+ stub_request(:get, document_url).to_return(body: document)+ expect(authenticator.discovery_document.keys).to contain_exactly(+ "issuer",+ "authorization_endpoint",+ "token_endpoint",+ "userinfo_endpoint",+ )+ end++ it "handles a non-200 response" do+ stub_request(:get, document_url).to_return(status: 404)+ expect(authenticator.discovery_document).to eq(nil)+ end++ it "handles a network error" do+ stub_request(:get, document_url).to_timeout+ expect(authenticator.discovery_document).to eq(nil)+ end++ it "handles invalid json" do+ stub_request(:get, document_url).to_return(body: "this is not the json you're looking for")+ expect(authenticator.discovery_document).to eq(nil)+ end++ it "caches a success response" do+ stub = stub_request(:get, document_url).to_return(body: document)+ expect(authenticator.discovery_document).not_to eq(nil)+ expect(authenticator.discovery_document).not_to eq(nil)+ expect(stub).to have_been_requested.once+ end++ it "caches a failed response" do+ stub = stub_request(:get, document_url).to_return(status: 404)+ expect(authenticator.discovery_document).to eq(nil)+ expect(authenticator.discovery_document).to eq(nil)+ expect(stub).to have_been_requested.once+ end+ end+enddiff --git a/plugins/discourse-openid-connect/spec/requests/rp_initiated_logout_spec.rb b/plugins/discourse-openid-connect/spec/requests/rp_initiated_logout_spec.rbnew file mode 100644index 00000000000..de935cdbd22--- /dev/null+++ b/plugins/discourse-openid-connect/spec/requests/rp_initiated_logout_spec.rb@@ -0,0 +1,114 @@+# frozen_string_literal: true++require "rails_helper"++describe "OIDC RP-Initiated Logout" do+ let(:document_url) do+ SiteSetting.openid_connect_discovery_document =+ "https://id.example.com/.well-known/openid-configuration"+ end+ let(:document) do+ {+ issuer: "https://id.example.com/",+ authorization_endpoint: "https://id.example.com/authorize",+ token_endpoint: "https://id.example.com/token",+ userinfo_endpoint: "https://id.example.com/userinfo",+ end_session_endpoint: "https://id.example.com/endsession",+ }+ end+ fab!(:user)++ before do+ SiteSetting.openid_connect_enabled = true+ SiteSetting.openid_connect_rp_initiated_logout = true+ stub_request(:get, document_url).to_return(body: lambda { |r| document.to_json })+ end++ after { Discourse.cache.delete("openid-connect-discovery-#{document_url}") }++ it "does nothing for a user with no oidc record" do+ sign_in(user)+ delete "/session/#{user.username}", xhr: true+ expect(response.status).to eq(200)+ expect(response.parsed_body["redirect_url"]).to eq("/")+ end++ it "does nothing for a user with no token in their oidc record" do+ sign_in(user)+ UserAssociatedAccount.create!(provider_name: "oidc", user: user, provider_uid: "myuid")+ delete "/session/#{user.username}", xhr: true+ expect(response.status).to eq(200)+ expect(response.parsed_body["redirect_url"]).to eq("/")+ end++ context "with user and token" do+ before do+ sign_in(user)+ UserAssociatedAccount.create!(+ provider_name: "oidc",+ user: user,+ provider_uid: "myuid",+ extra: {+ id_token: "myoidctoken",+ },+ )+ end++ it "redirects the user to the logout endpoint" do+ delete "/session/#{user.username}", xhr: true+ expect(response.status).to eq(200)+ expect(response.parsed_body["redirect_url"]).to eq(+ "https://id.example.com/endsession?id_token_hint=myoidctoken",+ )+ end++ it "correctly handles logout urls with existing query params" do+ document[:end_session_endpoint] += "?param=true"++ delete "/session/#{user.username}", xhr: true+ expect(response.status).to eq(200)+ expect(response.parsed_body["redirect_url"]).to eq(+ "https://id.example.com/endsession?param=true&id_token_hint=myoidctoken",+ )+ end++ it "includes the redirect URI if set" do+ SiteSetting.openid_connect_rp_initiated_logout_redirect = "https://example.com"+ delete "/session/#{user.username}", xhr: true+ expect(response.status).to eq(200)+ expect(response.parsed_body["redirect_url"]).to eq(+ "https://id.example.com/endsession?id_token_hint=myoidctoken&post_logout_redirect_uri=https%3A%2F%2Fexample.com",+ )+ end++ it "does not redirect if plugin disabled" do+ SiteSetting.openid_connect_enabled = false+ delete "/session/#{user.username}", xhr: true+ expect(response.status).to eq(200)+ expect(response.parsed_body["redirect_url"]).to eq("/")+ end++ it "does not redirect if rp initiated logout disabled" do+ SiteSetting.openid_connect_rp_initiated_logout = false+ delete "/session/#{user.username}", xhr: true+ expect(response.status).to eq(200)+ expect(response.parsed_body["redirect_url"]).to eq("/")+ end++ it "does not redirect if the discovery document is missing the endpoint" do+ stub_request(:get, document_url).to_return(body: "{}")+ SiteSetting.openid_connect_rp_initiated_logout = false+ delete "/session/#{user.username}", xhr: true+ expect(response.status).to eq(200)+ expect(response.parsed_body["redirect_url"]).to eq("/")+ end++ it "does not redirect if the discovery document has a network error" do+ stub_request(:get, document_url).to_timeout+ SiteSetting.openid_connect_rp_initiated_logout = false+ delete "/session/#{user.username}", xhr: true+ expect(response.status).to eq(200)+ expect(response.parsed_body["redirect_url"]).to eq("/")+ end+ end+enddiff --git a/plugins/discourse-openid-connect/spec/system/core_features_spec.rb b/plugins/discourse-openid-connect/spec/system/core_features_spec.rbnew file mode 100644index 00000000000..db86db283bd--- /dev/null+++ b/plugins/discourse-openid-connect/spec/system/core_features_spec.rb@@ -0,0 +1,7 @@+# frozen_string_literal: true++RSpec.describe "Core features", type: :system do+ before { enable_current_plugin }++ it_behaves_like "having working core features"+enddiff --git a/translator.yml b/translator.ymlindex 5a670f699b9..66358ea14b7 100644--- a/translator.yml+++ b/translator.yml@@ -150,3 +150,10 @@ files:- source_path: plugins/discourse-oauth2-basic/config/locales/server.en.ymldestination_path: plugins/oauth2-basic/server.ymllabel: oauth2-basic++ - source_path: plugins/discourse-openid-connect/config/locales/client.en.yml+ destination_path: plugins/openid-connect/client.yml+ label: openid-connect+ - source_path: plugins/discourse-openid-connect/config/locales/server.en.yml+ destination_path: plugins/openid-connect/server.yml+ label: openid-connect