Skip to content

A platform for community discussion. Free, open, simple.

DEV: Move discourse-oauth2-basic to core (#33570)

Jarek Radosz3d00a1389af7
diff --git a/.github/labeler.yml b/.github/labeler.yml
index 3f4afbda6d1..1539074b02f 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -46,6 +46,10 @@ discourse-microsoft-auth:
- changed-files:
- any-glob-to-any-file: plugins/discourse-microsoft-auth/**/*
+discourse-oauth2-basic:
+ - changed-files:
+ - any-glob-to-any-file: plugins/discourse-oauth2-basic/**/*
+
footnote:
- changed-files:
- any-glob-to-any-file: plugins/footnote/**/*
diff --git a/.gitignore b/.gitignore
index fe3af50f6be..61e8c4ad9b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,7 @@
!/plugins/discourse-login-with-amazon
!/plugins/discourse-lti
!/plugins/discourse-microsoft-auth
+!/plugins/discourse-oauth2-basic
/plugins/*/auto_generated
/spec/fixtures/plugins/my_plugin/auto_generated
diff --git a/plugins/discourse-oauth2-basic/README.md b/plugins/discourse-oauth2-basic/README.md
new file mode 100644
index 00000000000..ee477ddfc7d
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/README.md
@@ -0,0 +1,168 @@
+## discourse-oauth2-basic
+
+This plugin allows you to use a basic OAuth2 provider as authentication for
+Discourse. It should work with many providers, with the caveat that they
+must provide a JSON endpoint for retrieving information about the user
+you are logging in.
+
+This is mainly useful for people who are using login providers that aren't
+very popular. If you want to use Google, Facebook or Twitter, those are
+included out of the box and you don't need this plugin. You can also
+look for other login providers in our [Github Repo](https://github.com/discourse).
+
+## Usage
+
+## Part 1: Basic Configuration
+
+First, set up your Discourse application remotely on your OAuth2 provider.
+It will require a **Redirect URI** which should be:
+
+`http://DISCOURSE_HOST/auth/oauth2_basic/callback`
+
+Replace `DISCOURSE_HOST` with the appropriate value, and make sure you are
+using `https` if enabled. The OAuth2 provider should supply you with a
+client ID and secret, as well as a couple of URLs.
+
+Visit your **Admin** > **Settings** > **OAuth2 Login** and fill in the basic
+configuration for the OAuth2 provider:
+
+- `oauth2_enabled` - check this off to enable the feature
+
+- `oauth2_client_id` - the client ID from your provider
+
+- `oauth2_client_secret` - the client secret from your provider
+
+- `oauth2_authorize_url` - your provider's authorization URL
+
+- `oauth2_token_url` - your provider's token URL.
+
+If you can't figure out the values for the above settings, check the
+developer documentation from your provider or contact their customer
+support.
+
+## Part 2: Configuring the JSON User Endpoint
+
+Discourse is now capable of receiving an authorization token from your
+OAuth2 provider. Unfortunately, Discourse requires more information to
+be able to complete the authentication.
+
+We require an API endpoint that can be contacted to retrieve information
+about the user based on the token.
+
+For example, the OAuth2 provider [SoundCloud provides such a URL](https://developers.soundcloud.com/docs/api/reference#me).
+If you have an OAuth2 token for SoundCloud, you can make a GET request
+to `https://api.soundcloud.com/me?oauth_token=A_VALID_TOKEN` and
+will get back a JSON object containing information on the user.
+
+To configure this on Discourse, we need to set the value of the
+`oauth2_user_json_url` setting. In this case, we'll input the value of:
+
+```
+https://api.soundcloud.com/me?oauth_token=:token
+```
+
+The part with `:token` tells Discourse that it needs to replace that value
+with the authorization token it received when the authentication completed.
+Discourse will also add the `Authorization: Bearer` HTTP header with the
+token in case your API uses that instead.
+
+There is one last step to complete. We need to tell Discourse what
+attributes are available in the JSON it received. Here's a sample
+response from SoundCloud:
+
+```json
+{
+ "id": 3207,
+ "permalink": "jwagener",
+ "username": "Johannes Wagener",
+ "uri": "https://api.soundcloud.com/users/3207",
+ "permalink_url": "http://soundcloud.com/jwagener",
+ "avatar_url": "http://i1.sndcdn.com/avatars-000001552142-pbw8yd-large.jpg?142a848",
+ "country": "Germany",
+ "full_name": "Johannes Wagener",
+ "city": "Berlin"
+}
+```
+
+The `oauth2_json_user_id_path`, `oauth2_json_username_path`, `oauth2_json_name_path` and
+`oauth2_json_email_path` variables should be set to point to the appropriate attributes
+in the JSON.
+
+The only mandatory attribute is _id_ - we need that so when the user logs on in the future
+that we can pull up the correct account. The others are great if available -- they will
+make the signup process faster for the user as they will be pre-populated in the form.
+
+Here's how I configured the JSON path settings:
+
+```
+ oauth2_json_user_id_path: 'id'
+ oauth2_json_username_path: 'permalink'
+ oauth2_json_name_path: 'full_name'
+```
+
+I used `permalink` because it seems more similar to what Discourse expects for a username
+than the username in their JSON. Notice I omitted the email path: SoundCloud do not
+provide an email so the user will have to provide and verify this when they sign up
+the first time on Discourse.
+
+If the properties you want from your JSON object are nested, you can use periods.
+So for example if the API returned a different structure like this:
+
+```json
+{
+ "user": {
+ "id": 1234,
+ "email": {
+ "address": "[email protected]"
+ }
+ }
+}
+```
+
+You could use `user.id` for the `oauth2_json_user_id_path` and `user.email.address` for `oauth2_json_email_path`.
+
+## Part 3: Test it with Google OAuth 2.0 Server
+
+To test this plugin in your local dev environment you can use Google OAuth 2.0 Server. Follow [this guide](https://support.google.com/cloud/answer/6158849?hl=en) to create new OAuth client id & secret.
+
+- While creating it choose "Web application" as "Application type".
+- Add `http://localhost:3000` in "Authorized JavaScript origins" and `http://localhost:3000/auth/oauth2_basic/callback` in "Authorized redirect URIs" fields.
+- Then add following site settings in your admin panel.
+
+```json
+{
+ "oauth2_enabled": true,
+ "oauth2_client_id": "YOUR_PROJECT_CLIENT_ID",
+ "oauth2_client_secret": "YOUR_PROJECT_CLIENT_SECRET",
+ "oauth2_authorize_url": "https://accounts.google.com/o/oauth2/auth",
+ "oauth2_token_url": "https://www.googleapis.com/oauth2/v3/token",
+ "oauth2_user_json_url": "https://www.googleapis.com/userinfo/v2/me",
+ "oauth2_json_user_id_path": "id",
+ "oauth2_json_user_name_path": "name",
+ "oauth2_json_user_email_path": "email",
+ "oauth2_json_user_avatar_path": "picture",
+ "oauth2_email_verified": true,
+ "oauth2_scope": "https://www.googleapis.com/auth/userinfo.email"
+}
+```
+
+That's it! You can check it now in your browser.
+
+Good luck setting up custom OAuth2 on your Discourse!
+
+### Issues
+
+Please use [this topic on meta](https://meta.discourse.org/t/oauth2-basic-support/33879) to discuss
+issues with the plugin, including bugs and feature requests.
+
+### How to run tests
+
+Make sure the plugin has been installed, then from the discourse directory run:
+
+```
+LOAD_PLUGINS=1 bundle exec rspec plugins/discourse-oauth2-basic/spec/plugin_spec.rb
+```
+
+### License
+
+MIT
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.ar.yml b/plugins/discourse-oauth2-basic/config/locales/client.ar.yml
new file mode 100644
index 00000000000..f4eae36f849
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.ar.yml
@@ -0,0 +1,11 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.be.yml b/plugins/discourse-oauth2-basic/config/locales/client.be.yml
new file mode 100644
index 00000000000..2ea77a0d350
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.bg.yml b/plugins/discourse-oauth2-basic/config/locales/client.bg.yml
new file mode 100644
index 00000000000..52333529d3c
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.bs_BA.yml b/plugins/discourse-oauth2-basic/config/locales/client.bs_BA.yml
new file mode 100644
index 00000000000..828a7e65af8
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.ca.yml b/plugins/discourse-oauth2-basic/config/locales/client.ca.yml
new file mode 100644
index 00000000000..ec737bc1a5b
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.cs.yml b/plugins/discourse-oauth2-basic/config/locales/client.cs.yml
new file mode 100644
index 00000000000..041b2f0bd05
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.da.yml b/plugins/discourse-oauth2-basic/config/locales/client.da.yml
new file mode 100644
index 00000000000..f39c727c594
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.de.yml b/plugins/discourse-oauth2-basic/config/locales/client.de.yml
new file mode 100644
index 00000000000..48e5ba74d95
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.de.yml
@@ -0,0 +1,15 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
+ admin:
+ site_settings:
+ categories:
+ discourse_oauth2_basic: "OAuth2 Anmeldung"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.el.yml b/plugins/discourse-oauth2-basic/config/locales/client.el.yml
new file mode 100644
index 00000000000..377bc16ddb5
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.el.yml
@@ -0,0 +1,15 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
+ admin:
+ site_settings:
+ categories:
+ discourse_oauth2_basic: "Σύνδεση OAuth2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.en.yml b/plugins/discourse-oauth2-basic/config/locales/client.en.yml
new file mode 100644
index 00000000000..cf4e259071a
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.en.yml
@@ -0,0 +1,9 @@
+en:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
+ admin:
+ site_settings:
+ categories:
+ discourse_oauth2_basic: "OAuth2 Login"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.en_GB.yml b/plugins/discourse-oauth2-basic/config/locales/client.en_GB.yml
new file mode 100644
index 00000000000..2d4fa180ec7
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.es.yml b/plugins/discourse-oauth2-basic/config/locales/client.es.yml
new file mode 100644
index 00000000000..682e4ee5481
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.es.yml
@@ -0,0 +1,11 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.et.yml b/plugins/discourse-oauth2-basic/config/locales/client.et.yml
new file mode 100644
index 00000000000..0ea0b6d554b
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.fa_IR.yml b/plugins/discourse-oauth2-basic/config/locales/client.fa_IR.yml
new file mode 100644
index 00000000000..c323766c234
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.fa_IR.yml
@@ -0,0 +1,11 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.fi.yml b/plugins/discourse-oauth2-basic/config/locales/client.fi.yml
new file mode 100644
index 00000000000..37b37e86cce
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.fi.yml
@@ -0,0 +1,11 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.fr.yml b/plugins/discourse-oauth2-basic/config/locales/client.fr.yml
new file mode 100644
index 00000000000..f0244aa67ea
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.fr.yml
@@ -0,0 +1,11 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.gl.yml b/plugins/discourse-oauth2-basic/config/locales/client.gl.yml
new file mode 100644
index 00000000000..fb911ce1635
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.he.yml b/plugins/discourse-oauth2-basic/config/locales/client.he.yml
new file mode 100644
index 00000000000..ac699bc0bf3
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.he.yml
@@ -0,0 +1,15 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
+ admin:
+ site_settings:
+ categories:
+ discourse_oauth2_basic: "כניסה עם OAuth2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.hr.yml b/plugins/discourse-oauth2-basic/config/locales/client.hr.yml
new file mode 100644
index 00000000000..93343ce6e19
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.hu.yml b/plugins/discourse-oauth2-basic/config/locales/client.hu.yml
new file mode 100644
index 00000000000..4a6062b7ce9
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.hu.yml
@@ -0,0 +1,11 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.hy.yml b/plugins/discourse-oauth2-basic/config/locales/client.hy.yml
new file mode 100644
index 00000000000..cb18f64d356
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.id.yml b/plugins/discourse-oauth2-basic/config/locales/client.id.yml
new file mode 100644
index 00000000000..596e36b2e13
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.it.yml b/plugins/discourse-oauth2-basic/config/locales/client.it.yml
new file mode 100644
index 00000000000..e51c3e0e49b
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.it.yml
@@ -0,0 +1,11 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.ja.yml b/plugins/discourse-oauth2-basic/config/locales/client.ja.yml
new file mode 100644
index 00000000000..66fc3bb6a9d
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.ja.yml
@@ -0,0 +1,11 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.ko.yml b/plugins/discourse-oauth2-basic/config/locales/client.ko.yml
new file mode 100644
index 00000000000..18dd77fd3ec
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.lt.yml b/plugins/discourse-oauth2-basic/config/locales/client.lt.yml
new file mode 100644
index 00000000000..16bb19758dc
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.lv.yml b/plugins/discourse-oauth2-basic/config/locales/client.lv.yml
new file mode 100644
index 00000000000..59e0ef6f4ed
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.nb_NO.yml b/plugins/discourse-oauth2-basic/config/locales/client.nb_NO.yml
new file mode 100644
index 00000000000..2e2224d1472
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.nl.yml b/plugins/discourse-oauth2-basic/config/locales/client.nl.yml
new file mode 100644
index 00000000000..1a640d96fd1
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.nl.yml
@@ -0,0 +1,11 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.pl_PL.yml b/plugins/discourse-oauth2-basic/config/locales/client.pl_PL.yml
new file mode 100644
index 00000000000..a260c31c64c
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.pt.yml b/plugins/discourse-oauth2-basic/config/locales/client.pt.yml
new file mode 100644
index 00000000000..298ba523c1d
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.pt_BR.yml b/plugins/discourse-oauth2-basic/config/locales/client.pt_BR.yml
new file mode 100644
index 00000000000..5fba61a4f0f
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.pt_BR.yml
@@ -0,0 +1,11 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.ro.yml b/plugins/discourse-oauth2-basic/config/locales/client.ro.yml
new file mode 100644
index 00000000000..08a77f812ee
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.ru.yml b/plugins/discourse-oauth2-basic/config/locales/client.ru.yml
new file mode 100644
index 00000000000..8d1d90decce
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.ru.yml
@@ -0,0 +1,11 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.sk.yml b/plugins/discourse-oauth2-basic/config/locales/client.sk.yml
new file mode 100644
index 00000000000..6f815624081
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.sl.yml b/plugins/discourse-oauth2-basic/config/locales/client.sl.yml
new file mode 100644
index 00000000000..23489a48b1f
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.sq.yml b/plugins/discourse-oauth2-basic/config/locales/client.sq.yml
new file mode 100644
index 00000000000..7f051b7a7cf
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.sr.yml b/plugins/discourse-oauth2-basic/config/locales/client.sr.yml
new file mode 100644
index 00000000000..88d63d6ae1a
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.sv.yml b/plugins/discourse-oauth2-basic/config/locales/client.sv.yml
new file mode 100644
index 00000000000..95184c11cf5
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.sv.yml
@@ -0,0 +1,11 @@
+# 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:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.sw.yml b/plugins/discourse-oauth2-basic/config/locales/client.sw.yml
new file mode 100644
index 00000000000..0d7cdd075bf
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.te.yml b/plugins/discourse-oauth2-basic/config/locales/client.te.yml
new file mode 100644
index 00000000000..03967bdbb07
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.th.yml b/plugins/discourse-oauth2-basic/config/locales/client.th.yml
new file mode 100644
index 00000000000..7de85ff91c4
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.tr_TR.yml b/plugins/discourse-oauth2-basic/config/locales/client.tr_TR.yml
new file mode 100644
index 00000000000..1b7f07148a6
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.tr_TR.yml
@@ -0,0 +1,11 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.ug.yml b/plugins/discourse-oauth2-basic/config/locales/client.ug.yml
new file mode 100644
index 00000000000..a6bf0185ae2
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.uk.yml b/plugins/discourse-oauth2-basic/config/locales/client.uk.yml
new file mode 100644
index 00000000000..f1390545d1d
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.ur.yml b/plugins/discourse-oauth2-basic/config/locales/client.ur.yml
new file mode 100644
index 00000000000..b4a9c21ee2f
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.vi.yml b/plugins/discourse-oauth2-basic/config/locales/client.vi.yml
new file mode 100644
index 00000000000..f629dcf5329
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/client.zh_CN.yml b/plugins/discourse-oauth2-basic/config/locales/client.zh_CN.yml
new file mode 100644
index 00000000000..dfcc322a6d3
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/client.zh_CN.yml
@@ -0,0 +1,11 @@
+# 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:
+ js:
+ login:
+ oauth2_basic:
+ name: "OAuth 2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/client.zh_TW.yml b/plugins/discourse-oauth2-basic/config/locales/client.zh_TW.yml
new file mode 100644
index 00000000000..7e15fab0018
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.ar.yml b/plugins/discourse-oauth2-basic/config/locales/server.ar.yml
new file mode 100644
index 00000000000..c86e8a10878
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.ar.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "تعذَّر استرداد تفاصيل المستخدم الخاصة بك. هل لديك حساب نشط؟"
+ site_settings:
+ oauth2_enabled: "تم تفعيل مصادقة OAuth2 المخصَّصة"
+ oauth2_client_id: "مُعرِّف العميل لمصادقة OAuth2 المخصَّصة"
+ oauth2_client_secret: "سر العميل لمصادقة OAuth2 المخصَّصة"
+ oauth2_authorize_url: "عنوان URL للمصادقة لمصادقة OAuth2"
+ oauth2_authorize_signup_url: 'عنوان URL للمصادقة البديلة (اختياري) المستخدم عند استخدام الزر "تسجيل"'
+ oauth2_token_url: "عنوان URL للرمز المميَّز لمصادقة OAuth2"
+ oauth2_token_url_method: "الطريقة المستخدمة لجلب عنوان URL للرمز المميَّز"
+ oauth2_callback_user_id_path: "المسار في استجابة الرمز المميَّز لمُعرِّف المستخدم. على سبيل المثال: params.info.uuid"
+ oauth2_callback_user_info_paths: "المسارات في استجابة الرمز المميَّز لخصائص المستخدم الأخرى. الخصائص المدعومة هي name وusername وemail وemail_verified وavatar. التنسيق هو property:path، على سبيل المثال: name:params.info.name"
+ oauth2_fetch_user_details: "جلب ملف JSON للمستخدم لمصادقة OAuth2"
+ oauth2_user_json_url: "عنوان URL لجلب ملف JSON للمستخدم لمصادقة OAuth2 (لاحظ أننا استبدلنا :id بالمُعرِّف الذي تم إرجاعه من قِبل استدعاء OAuth و:token بمُعرِّف الرمز المميَّز)"
+ oauth2_user_json_url_method: "الطريقة المستخدمة لجلب عنوان URL لملف JSON"
+ oauth2_json_user_id_path: "المسار في ملف JSON للمستخدم لمصادقة OAuth2 إلى مُعرِّف المستخدم. على سبيل المثال: user.id"
+ oauth2_json_username_path: "المسار في ملف JSON للمستخدم لمصادقة OAuth2. على سبيل المثال: user.username"
+ oauth2_json_name_path: "المسار في ملف JSON للمستخدم لمصادقة OAuth2 إلى اسم المستخدم الكامل. على سبيل المثال: user.name.full"
+ oauth2_json_email_path: "المسار في ملف JSON للمستخدم لمصادقة OAuth2 إلى البريد الإلكتروني للمستخدم. على سبيل المثال: user.email"
+ oauth2_json_email_verified_path: "المسار في ملف JSON للمستخدم لمصادقة OAuth2 إلى حالة التحقُّق من البريد الإلكتروني للمستخدم. على سبيل المثال: user.email.verified. يجب إيقاف oauth2_email_verified لهذا الإعداد ليحظى بأي تأثير"
+ oauth2_json_avatar_path: "المسار في ملف JSON للمستخدم لمصادقة OAuth2 إلى الصورة الرمزية للمستخدم. على سبيل المثال: user.avatar_url"
+ oauth2_email_verified: "تحقَّق من هذا إذا كان موقع OAuth2 قد تحقَّق من البريد الإلكتروني"
+ oauth2_overrides_email: "استبدال البريد الإلكتروني لـ Discourse بالبريد الإلكتروني البعيد في كل عملية تسجيل دخول. يعمل بإعداد `auth_overrides_email` نفسه، لكنه خاص بعمليات تسجيل الدخول من خلال OAuth2."
+ oauth2_send_auth_header: "إرسال بيانات اعتماد العميل في رأس مصادقة HTTP"
+ oauth2_send_auth_body: "إرسال بيانات اعتماد العميل في نص الطلب"
+ oauth2_debug_auth: "تضمين معلومات تصحيح الأخطاء المنسَّقة في سجلاتك"
+ oauth2_authorize_options: "طلب الخيارات التالية عند المصادقة"
+ oauth2_scope: "طلب هذا المجال عند المصادقة"
+ oauth2_button_title: "نص زر OAuth2"
+ oauth2_allow_association_change: السماح للمستخدمين بإلغاء ربط حسابات Discourse الخاصة بهم وإعادة ربطها من مقدِّم خدمة OAuth2
+ oauth2_disable_csrf: "إيقاف فحص CSRF"
+ errors:
+ oauth2_fetch_user_details: "يجب أن يكون oauth2_callback_user_id_path موجودًا لإيقاف oauth2_fetch_user_details"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.be.yml b/plugins/discourse-oauth2-basic/config/locales/server.be.yml
new file mode 100644
index 00000000000..2ea77a0d350
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.bg.yml b/plugins/discourse-oauth2-basic/config/locales/server.bg.yml
new file mode 100644
index 00000000000..52333529d3c
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.bs_BA.yml b/plugins/discourse-oauth2-basic/config/locales/server.bs_BA.yml
new file mode 100644
index 00000000000..5b93995f168
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.bs_BA.yml
@@ -0,0 +1,14 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "Nije moguće dohvatiti vaše korisničke podatke. Imate li aktivan račun?"
+ site_settings:
+ oauth2_enabled: "Prilagođeni OAuth2 je omogućen"
+ oauth2_client_id: "ID klijenta za prilagođeni OAuth2"
+ oauth2_client_secret: "Tajna klijenta za prilagođeni OAuth2"
+ oauth2_authorize_url: "URL autorizacije za OAuth2"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.ca.yml b/plugins/discourse-oauth2-basic/config/locales/server.ca.yml
new file mode 100644
index 00000000000..161e5b22c60
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.ca.yml
@@ -0,0 +1,34 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "No s'han pogut recuperar les dades d'usuari. Teniu un compte actiu?"
+ site_settings:
+ oauth2_enabled: "OAuth2 personalitzat està habilitat"
+ oauth2_client_id: "ID de client per a OAuth2 personalitzat"
+ oauth2_client_secret: "Secret del client per a OAuth2 personalitzat"
+ oauth2_authorize_url: "URL d'autorització per a OAuth2"
+ oauth2_token_url: "URL del testimoni per a OAuth2"
+ oauth2_token_url_method: "Mètode que s'utilitza per a obtenir l'URL del testimoni"
+ oauth2_callback_user_id_path: "Camí en la resposta del testimoni a l'identificador de l'usuari, p. ex. params.info.uuid"
+ oauth2_callback_user_info_paths: "Camins en la resposta de testimoni a altres propietats de l'usuari. Les propietats compatibles són: name, username, email, email_verified i avatar. El format és propietat:camí, per exemple name:params.info.name"
+ oauth2_fetch_user_details: "Obté el JSON d'usuari per a OAuth2"
+ oauth2_user_json_url: "URL per a obtenir el JSON d'usuari per a OAuth2 (tingueu en compte que reemplacem :id amb l'identificador retornat per la crida OAuth i :token amb l'identificador de testimoni)"
+ oauth2_user_json_url_method: "Mètode utilitzat per a obtenir l'URL de l'usuari JSON"
+ oauth2_json_user_id_path: "Camí en el JSON d'usuari OAuth2 a l'identificador d'usuari, p. ex.: user.id"
+ oauth2_json_username_path: "Camí en el JSON d'usuari OAuth2 al nom d'usuari, p. ex.: user.username"
+ oauth2_json_name_path: "Ruta d'accés en el JSON d'usuari OAuth2 al nom complet d'usuari. Per exemple: user.name.full"
+ oauth2_json_email_path: "Ruta d'accés en el JSON d'usuari OAuth2 al correu electrònic d'usuari. Per exemple: user.email"
+ oauth2_email_verified: "Comprova-ho si el lloc web OAuth2 ha verificat el correu electrònic"
+ oauth2_send_auth_header: "Envia les credencials de client en una capçalera d’autorització HTTP"
+ oauth2_debug_auth: "Inclou informació de depuració enriquida en els registres"
+ oauth2_authorize_options: "En autoritzar sol·licita aquestes opcions"
+ oauth2_scope: "En autoritzar sol·licita aquest abast"
+ oauth2_button_title: "Text del botó OAuth2"
+ oauth2_allow_association_change: Permet als usuaris desconnectar i reconnectar els comptes de Discourse des del proveïdor OAuth2
+ errors:
+ oauth2_fetch_user_details: "oauth2_callback_user_id_p_path ha de ser present per a inhabilitar oauth2_fetch_user_details"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.cs.yml b/plugins/discourse-oauth2-basic/config/locales/server.cs.yml
new file mode 100644
index 00000000000..041b2f0bd05
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.da.yml b/plugins/discourse-oauth2-basic/config/locales/server.da.yml
new file mode 100644
index 00000000000..f39c727c594
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.de.yml b/plugins/discourse-oauth2-basic/config/locales/server.de.yml
new file mode 100644
index 00000000000..1f2dce3065d
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.de.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "Deine Benutzerdaten konnten nicht abgerufen werden. Hast du ein aktives Konto?"
+ site_settings:
+ oauth2_enabled: "Benutzerdefiniertes OAuth2 ist aktiviert"
+ oauth2_client_id: "Client-ID für benutzerdefiniertes OAuth2"
+ oauth2_client_secret: "Client-Geheimnis für benutzerdefiniertes OAuth2"
+ oauth2_authorize_url: "Autorisierungs-URL für OAuth2"
+ oauth2_authorize_signup_url: '(optional) Alternative Autorisierungs-URL, die zum Einsatz kommt, wenn die Schaltfläche „Registrieren“ verwendet wird'
+ oauth2_token_url: "Token-URL für OAuth2"
+ oauth2_token_url_method: "Methode, mit der die Token-URL abgerufen wird"
+ oauth2_callback_user_id_path: "Pfad in der Token-Antwort zur Benutzer-ID. Beispiel: params.info.uuid"
+ oauth2_callback_user_info_paths: "Pfade in der Token-Antwort zu anderen Benutzereigenschaften. Unterstützte Eigenschaften sind name, username, email, email_verified und avatar. Format: property:path, z. B. name:params.info.name"
+ oauth2_fetch_user_details: "Benutzer-JSON für OAuth2 abrufen"
+ oauth2_user_json_url: "URL zum Abrufen der Benutzer-JSON für OAuth2 (beachte, dass wir :id durch die vom OAuth-Call zurückgegebene ID und :token durch die Token-ID ersetzen)"
+ oauth2_user_json_url_method: "Methode, mit der die Benutzer-JSON-URL abgerufen wird"
+ oauth2_json_user_id_path: "Pfad im OAuth2-Benutzer-JSON zur Benutzer-ID. Beispiel: user.id"
+ oauth2_json_username_path: "Pfad im OAuth2-Benutzer-JSON zum Benutzernamen. Beispiel: user.username"
+ oauth2_json_name_path: "Pfad im OAuth2-Benutzer-JSON zum vollständigen Namen des Benutzers. Beispiel: user.name.full"
+ oauth2_json_email_path: "Pfad im OAuth2-Benutzer-JSON zur E-Mail-Adresse des Benutzers. Beispiel: user.email"
+ oauth2_json_email_verified_path: "Pfad im OAuth2-Benutzer-JSON zum E-Mail-Verifizierungsstatus des Benutzers. Beispiel: user.email.verified. oauth2_email_verified muss deaktiviert sein, damit diese Einstellung eine Wirkung hat"
+ oauth2_json_avatar_path: "Pfad im OAuth2-Benutzer-JSON zum Avatar des Benutzers. Beispiel: user.avatar_url"
+ oauth2_email_verified: "Aktivieren, wenn die OAuth2-Website die E-Mail verifiziert hat"
+ oauth2_overrides_email: "Überschreibt die Discourse-E-Mail-Adresse bei jeder Anmeldung mit der remote E-Mail-Adresse. Funktioniert genauso wie die Einstellung `auth_overrides_email`, ist aber spezifisch für OAuth2-Anmeldungen."
+ oauth2_send_auth_header: "Client-Anmeldedaten in einem HTTP-Autorisierungs-Header senden"
+ oauth2_send_auth_body: "Client-Anmeldedaten im Anfrage-Body senden"
+ oauth2_debug_auth: "Ausführliche Informationen zur Fehlerbehebung in Protokolle aufnehmen"
+ oauth2_authorize_options: "Bei der Autorisierung folgende Optionen anfordern"
+ oauth2_scope: "Bei der Autorisierung folgenden Bereich anfordern"
+ oauth2_button_title: "Der Text für die OAuth2-Schaltfläche"
+ oauth2_allow_association_change: Erlaube Benutzern, ihre Discourse-Konten vom OAuth2-Anbieter zu trennen und wieder zu verbinden
+ oauth2_disable_csrf: "CSRF-Prüfung deaktivieren"
+ errors:
+ oauth2_fetch_user_details: "oauth2_callback_user_id_path muss vorhanden sein, um oauth2_fetch_user_details zu deaktivieren"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.el.yml b/plugins/discourse-oauth2-basic/config/locales/server.el.yml
new file mode 100644
index 00000000000..1de3fcb1c5e
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.el.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/
+
+el:
+ site_settings:
+ oauth2_disable_csrf: "Απενεργοποίηση ελέγχου CSRF"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.en.yml b/plugins/discourse-oauth2-basic/config/locales/server.en.yml
new file mode 100644
index 00000000000..84a765c8cde
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.en.yml
@@ -0,0 +1,36 @@
+en:
+ login:
+ authenticator_error_fetch_user_details: "Could not retrieve your user details. Do you have an active account?"
+
+ site_settings:
+ oauth2_enabled: "Custom OAuth2 is enabled"
+ oauth2_client_id: "Client ID for custom OAuth2"
+ oauth2_client_secret: "Client Secret for custom OAuth2"
+ oauth2_authorize_url: "Authorization URL for OAuth2"
+ oauth2_authorize_signup_url: '(optional) Alternative authorization URL used when the "Sign Up" button is used'
+ oauth2_token_url: "Token URL for OAuth2"
+ oauth2_token_url_method: "Method used to fetch the Token URL"
+ oauth2_callback_user_id_path: "Path in the token response to the user id. eg: params.info.uuid"
+ oauth2_callback_user_info_paths: "Paths in the token response to other user properties. Supported properties are name, username, email, email_verified and avatar. Format is property:path, eg: name:params.info.name"
+ oauth2_fetch_user_details: "Fetch user JSON for OAuth2"
+ oauth2_user_json_url: "URL to fetch user JSON for OAuth2 (note we replace :id with the id returned by OAuth call and :token with the token id)"
+ oauth2_user_json_url_method: "Method used to fetch the user JSON URL"
+ oauth2_json_user_id_path: "Path in the OAuth2 User JSON to the user id. eg: user.id"
+ oauth2_json_username_path: "Path in the OAuth2 User JSON to the username. eg: user.username"
+ oauth2_json_name_path: "Path in the OAuth2 User JSON to the user's full. eg: user.name.full"
+ oauth2_json_email_path: "Path in the OAuth2 User JSON to the user's email. eg: user.email"
+ oauth2_json_email_verified_path: "Path in the OAuth2 User JSON to the user's email verification state. eg: user.email.verified. oauth2_email_verified must be disabled for this setting to have any effect"
+ oauth2_json_avatar_path: "Path in the Oauth2 User JSON to the user's avatar. eg: user.avatar_url"
+ oauth2_email_verified: "Check this if the OAuth2 site has verified the email"
+ oauth2_overrides_email: "Override the Discourse email with the remote email on every login. Works the same as the `auth_overrides_email` setting, but is specific to OAuth2 logins."
+ oauth2_send_auth_header: "Send client credentials in an HTTP Authorization header"
+ oauth2_send_auth_body: "Send client credentials in the request body"
+ oauth2_debug_auth: "Include rich debugging information in your logs"
+ oauth2_authorize_options: "When authorizing request these options"
+ oauth2_scope: "When authorizing request this scope"
+ oauth2_button_title: "The text for the OAuth2 button"
+ oauth2_allow_association_change: Allow users to disconnect and reconnect their Discourse accounts from the OAuth2 provider
+ oauth2_disable_csrf: "Disable CSRF check"
+
+ errors:
+ oauth2_fetch_user_details: "oauth2_callback_user_id_path must be present to disable oauth2_fetch_user_details"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.en_GB.yml b/plugins/discourse-oauth2-basic/config/locales/server.en_GB.yml
new file mode 100644
index 00000000000..2d4fa180ec7
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.es.yml b/plugins/discourse-oauth2-basic/config/locales/server.es.yml
new file mode 100644
index 00000000000..0f1478108ea
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.es.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "No se pudieron recuperar tus datos de usuario. ¿Tienes una cuenta activa?"
+ site_settings:
+ oauth2_enabled: "OAuth2 personalizado está habilitado"
+ oauth2_client_id: "ID de cliente para OAuth2 personalizado"
+ oauth2_client_secret: "Secreto de cliente para OAuth2 personalizado"
+ oauth2_authorize_url: "URL de autorización para OAuth2"
+ oauth2_authorize_signup_url: '(opcional) URL de autorización alternativa utilizada cuando se usa el botón «Registrarse»'
+ oauth2_token_url: "URL de token para OAuth2"
+ oauth2_token_url_method: "Método utilizado para obtener la URL del token"
+ oauth2_callback_user_id_path: "Ruta en la respuesta del token a la identificación del usuario. Ejemplo: params.info.uuid"
+ oauth2_callback_user_info_paths: "Rutas en la respuesta del token a otras propiedades del usuario. Las propiedades admitidas son nombre, nombre de usuario, correo electrónico, email_verified y avatar. El formato es property:path, por ejemplo: name:params.info.name"
+ oauth2_fetch_user_details: "Obtener usuario JSON para OAuth2"
+ oauth2_user_json_url: "URL para obtener el usuario JSON para OAuth2 (ten en cuenta que reemplazamos :id con la id devuelta por OAuth call y :token con la id del token)"
+ oauth2_user_json_url_method: "Método utilizado para obtener la URL JSON del usuario"
+ oauth2_json_user_id_path: "Ruta en el JSON del usuario de OAuth2 a la ID del usuario. por ejemplo: user.id"
+ oauth2_json_username_path: "Ruta en el JSON del usuario de OAuth2 al nombre de usuario. por ejemplo: user.username"
+ oauth2_json_name_path: "Ruta en el JSON del usuario de OAuth2 al usuario completo: user.name.full"
+ oauth2_json_email_path: "Ruta en el JSON del usuario de OAuth2 al correo electrónico del usuario: user.email"
+ oauth2_json_email_verified_path: "Ruta en el JSON de usuario de OAuth2 al estado de verificación de correo electrónico del usuario: user.email.verified. oauth2_email_verified debe estar deshabilitado para que esta configuración tenga efecto"
+ oauth2_json_avatar_path: "Ruta en el JSON del usuario de Oauth2 al avatar del usuario: user.avatar_url"
+ oauth2_email_verified: "Marca esto si el sitio OAuth2 ha verificado el correo electrónico"
+ oauth2_overrides_email: "Sobrescribe el correo electrónico de Discourse con el correo electrónico remoto en cada inicio de sesión. Funciona igual que la configuración `auth_overrides_email`, pero es específica de los inicios de sesión de OAuth2."
+ oauth2_send_auth_header: "Enviar credenciales de cliente en un encabezado de autorización HTTP"
+ oauth2_send_auth_body: "Enviar las credenciales del cliente en el cuerpo de la solicitud"
+ oauth2_debug_auth: "Incluir información abundante de depuración en tus registros"
+ oauth2_authorize_options: "Al autorizar, solicitar estas opciones"
+ oauth2_scope: "Al autorizar, solicitar este alcance"
+ oauth2_button_title: "El texto para el botón OAuth2"
+ oauth2_allow_association_change: Permitir a los usuarios desconectar y volver a conectar sus cuentas de Discourse del proveedor OAuth2
+ oauth2_disable_csrf: "Desactivar la comprobación CSRF"
+ errors:
+ oauth2_fetch_user_details: "oauth2_callback_user_id_path debe estar presente para deshabilitar oauth2_fetch_user_details"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.et.yml b/plugins/discourse-oauth2-basic/config/locales/server.et.yml
new file mode 100644
index 00000000000..0ea0b6d554b
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.fa_IR.yml b/plugins/discourse-oauth2-basic/config/locales/server.fa_IR.yml
new file mode 100644
index 00000000000..56512089fb5
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.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-oauth2-basic/config/locales/server.fi.yml b/plugins/discourse-oauth2-basic/config/locales/server.fi.yml
new file mode 100644
index 00000000000..ca2d93bd09a
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.fi.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "Käyttäjätietojasi ei löytynyt. Oletko varma, että tilisi on aktiivinen?"
+ site_settings:
+ oauth2_enabled: "Mukautettu OAuth2 on käytössä"
+ oauth2_client_id: "Mukautetun OAuth2:n asiakastunnus"
+ oauth2_client_secret: "Mukautetun OAuth2:n asiakkaan salatunnus"
+ oauth2_authorize_url: "OAuth2:n valtuutuksen URL-osoite"
+ oauth2_authorize_signup_url: '(valinnainen) Vaihtoehtoinen valtuutus-URL, jota käytetään, kun Rekisteröidy-painiketta käytetään'
+ oauth2_token_url: "OAuth2:n tunnuksen URL-osoite"
+ oauth2_token_url_method: "Tunnuksen URL-osoitteen hakemiseen käytetty menetelmä"
+ oauth2_callback_user_id_path: "Polku tunnuksen vastauksessa käyttäjätunnukseen. esim.: params.info.uuid"
+ oauth2_callback_user_info_paths: "Polut tunnuksen vastauksessa muille käyttäjän ominaisuuksille. Tuetut ominaisuudet ovat name, username, email, email_verified ja avatar. Muoto on ominaisuus:polku, esim.: name:params.info.name"
+ oauth2_fetch_user_details: "Hae käyttäjän JSON OAuth2:lle"
+ oauth2_user_json_url: "URL-osoite käyttäjän JSON:n hakemiseksi OAuth2:ta varten (huomaa, että korvaamme :id:n OAuth-kutsun palauttamalla id-tunnuksella ja :tokenin token-tunnuksella)"
+ oauth2_user_json_url_method: "Käyttäjän JSON:n URL-osoitteen hakemiseen käytetty menetelmä"
+ oauth2_json_user_id_path: "Polku OAuth2:n käyttäjän JSON:ssä käyttäjätunnukseen. esim.: user.id"
+ oauth2_json_username_path: "Polku OAuth2:n käyttäjän JSON:ssä käyttäjänimeen. esim.: user.username"
+ oauth2_json_name_path: "Polku OAuth2:n käyttäjän JSON:ssä käyttäjän koko nimeen. esim.: user.name.full"
+ oauth2_json_email_path: "Polku OAuth2:n käyttäjän JSON:ssä käyttäjän sähköpostiosoitteeseen. esim.: user.email"
+ oauth2_json_email_verified_path: "Polku OAuth2:n käyttäjän JSON:ssä käyttäjän sähköpostin vahvistustilaan. Esim.: user.email.verified. oauth2_email_verified täytyy poistaa käytöstä, jotta tällä asetuksella olisi vaikutusta."
+ oauth2_json_avatar_path: "Polku OAuth2:n käyttäjän JSON:ssä käyttäjän avatariin. esim.: user.avatar_url"
+ oauth2_email_verified: "Tarkasta, onko tämä OAuth2 sivusto varmistanut sähköpostin"
+ oauth2_overrides_email: "Ohita Discoursen sähköpostiosoite etäsähköpostilla jokaisen kirjautumisen yhteydessä. Toimii samalla tavalla kuin `auth_overrides_email`-asetus, mutta koskee OAuth2-kirjautumisia."
+ oauth2_send_auth_header: "Lähetä asiakkaan tunnistetiedot HTTP Authorization -otsikkotiedoissa"
+ oauth2_send_auth_body: "Lähetä asiakkaan tunnistetiedot pyynnön tekstiosassa"
+ oauth2_debug_auth: "Sisällytä lokeihin laajat virheenkorjaustiedot"
+ oauth2_authorize_options: "Pyydä näitä vaihtoehtoja valtuutuksen yhteydessä"
+ oauth2_scope: "Pyydä tätä aluetta valtuutuksen yhteydessä"
+ oauth2_button_title: "Teksti OAuth2-painiketta varten"
+ oauth2_allow_association_change: Salli käyttäjien yhdistää Discourse-tilinsä OAuth2-palveluntarjoajaan ja katkaista niiden yhteys
+ oauth2_disable_csrf: "Poista CSRF-tarkistus käytöstä"
+ errors:
+ oauth2_fetch_user_details: "oauth2_callback_user_id_path täytyy olla määritetty, jotta oauth2_fetch_user_details voidaan poistaa käytöstä"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.fr.yml b/plugins/discourse-oauth2-basic/config/locales/server.fr.yml
new file mode 100644
index 00000000000..90c32c60552
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.fr.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "Impossible de récupérer vos informations d'utilisateur. Avez-vous un compte actif ?"
+ site_settings:
+ oauth2_enabled: "L'option OAuth2 personnalisée est activée"
+ oauth2_client_id: "ID de client pour l'option OAuth2 personnalisée"
+ oauth2_client_secret: "Secret du client pour l'option OAuth2 personnalisée"
+ oauth2_authorize_url: "URL d'autorisation pour l'option OAuth2"
+ oauth2_authorize_signup_url: '(facultatif) URL d''autorisation alternative utilisée lorsque le bouton « S''inscrire » est utilisé'
+ oauth2_token_url: "URL du jeton pour l'option OAuth2"
+ oauth2_token_url_method: "Méthode utilisée pour récupérer l'adresse URL du jeton"
+ oauth2_callback_user_id_path: "Chemin dans la réponse du jeton vers l'ID utilisateur (p. ex., params.info.uuid)"
+ oauth2_callback_user_info_paths: "Chemins dans la réponse de jeton vers d'autres propriétés de l'utilisateur. Les propriétés prises en charge sont le nom, le nom d'utilisateur, l'adresse e-mail, l'adresse e-mail vérifiée et l'avatar (name, username, email, email_verified et avatar). Le format est le suivant : property:path (p. ex. : name:params.info.name)"
+ oauth2_fetch_user_details: "Récupérer le JSON de l'utilisateur pour l'option OAuth2"
+ oauth2_user_json_url: "URL pour récupérer le JSON de l'utilisateur pour l'option OAuth2 (remarque : nous remplaçons :id par l'identifiant renvoyé par l'appel OAuth et :token par l'identifiant du jeton)."
+ oauth2_user_json_url_method: "Méthode utilisée pour récupérer l'adresse URL du JSON de l'utilisateur"
+ oauth2_json_user_id_path: "Chemin dans le JSON de l'utilisateur OAuth2 vers l'ID utilisateur (p. ex., user.id)"
+ oauth2_json_username_path: "Chemin dans le JSON de l'utilisateur OAuth2 vers le nom d'utilisateur (p. ex., user.username)"
+ oauth2_json_name_path: "Chemin dans le JSON de l'utilisateur OAuth2 vers le nom complet de l'utilisateur (p. ex., user.name.full)"
+ oauth2_json_email_path: "Chemin dans le JSON de l'utilisateur OAuth2 vers l'adresse e-mail de l'utilisateur (p. ex., user.email)"
+ oauth2_json_email_verified_path: "Chemin dans le JSON de l'utilisateur OAuth2 vers l'état de vérification de l'adresse e-mail de l'utilisateur (p. ex., user.email.verified). L'attribut oauth2_email_verified doit être désactivé pour que ce paramètre prenne effet."
+ oauth2_json_avatar_path: "Chemin dans le JSON de l'utilisateur OAuth2 vers l'avatar de l'utilisateur (p. ex., user.avatar_url)"
+ oauth2_email_verified: "Cochez cette case si le site OAuth2 a vérifié l'adresse e-mail"
+ oauth2_overrides_email: "Remplacez l'adresse e-mail Discourse par l'adresse e-mail distante à chaque connexion. Fonctionne de la même manière que le paramètre « auth_overrides_email », mais reste spécifique aux connexions OAuth2."
+ oauth2_send_auth_header: "Envoyer les informations d'identification du client dans un en-tête d'autorisation HTTP"
+ oauth2_send_auth_body: "Envoyer les informations d'identification du client dans le corps de la requête"
+ oauth2_debug_auth: "Inclure des informations de débogage riches dans vos journaux"
+ oauth2_authorize_options: "Lors de l'autorisation, demander ces options"
+ oauth2_scope: "Lors de l’autorisation, demander cette permission"
+ oauth2_button_title: "Le texte du bouton OAuth2"
+ oauth2_allow_association_change: Autoriser les utilisateurs à déconnecter et à reconnecter leurs comptes Discourse du fournisseur OAuth2
+ oauth2_disable_csrf: "Désactiver la vérification CSRF"
+ errors:
+ oauth2_fetch_user_details: "Le paramètre oauth2_callback_user_id_path doit être présent pour désactiver oauth2_fetch_user_details"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.gl.yml b/plugins/discourse-oauth2-basic/config/locales/server.gl.yml
new file mode 100644
index 00000000000..fb911ce1635
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.he.yml b/plugins/discourse-oauth2-basic/config/locales/server.he.yml
new file mode 100644
index 00000000000..a65ae88d37d
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.he.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "לא ניתן לקבל את פרטי המשתמש שלך. יש לך חשבון פעיל?"
+ site_settings:
+ oauth2_enabled: "מופעל OAuth2 בהתאמה אישית"
+ oauth2_client_id: "מזהה לקוח ל־OAuth2 בהתאמה אישית"
+ oauth2_client_secret: "סוד לקוח ל־OAuth2 בהתאמה אישית"
+ oauth2_authorize_url: "כתובת אימות ל־OAuth2"
+ oauth2_authorize_signup_url: '(רשות) כתובת חלופית להרשאה בה ייעשה שימוש עם לחיצה על הכפתור „הרשמה”'
+ oauth2_token_url: "כתובת אסימון ל־OAuth2"
+ oauth2_token_url_method: "שיטה שמשמשת לקבלת כתובת האסימון"
+ oauth2_callback_user_id_path: "נתיב בתגובת האסימון למזהה המשתמש, למשל: params.info.uuid"
+ oauth2_callback_user_info_paths: "נתיבים בתגובת האסימון למאפיינים אחרים של משתמשים. המאפיינים הנתמכים הם name,‏ username,‏ email,‏ email_verified ו־avatar (שם, שם משתמש, כתובת דוא״ל, האם הדוא״ל מאומת ותמונה ייצוגית בהתאמה). התצורה היא מאפיין:נתיב, למשל: name:params.info.name"
+ oauth2_fetch_user_details: "אחזור JSON משתמש עבור OAuth2"
+ oauth2_user_json_url: "כתובת לקבל ה־JSON של המשתמש לטובת OAuth2 (נא לשים לב שהחלפת את הביטוי ‎:id במזהה שהוחזרת על ידי קריאת ה־OAuth ואת ‎:token באסימון המשתמש)"
+ oauth2_user_json_url_method: "שיטה שמשמשת לקבלת כתובת ה־JSON של המשתמש"
+ oauth2_json_user_id_path: "נתיב מזהה המשתמש ב־JSON של ה־OAuth2 של המשתמש. למשל: user.username"
+ oauth2_json_username_path: "נתיב שם המשתמש ב־JSON של ה־OAuth2 של המשתמש. למשל: user.username"
+ oauth2_json_name_path: "נתיב ב־JSON משתמש OAuth2 לשם המלא של המשתמש. למשל: user.name.full"
+ oauth2_json_email_path: "נתיב ב־JSON משתמש OAuth2 לכתובת הדוא״ל של המשתמש. למשל: user.email"
+ oauth2_json_email_verified_path: "נתיב למצב אימות כתובת הדוא״ל של המשתמש ב־JSON של ה־OAuth2 של המשתמש. למשל: user.email.verified.‏ oauth2_email_verified חייב להיות מושבת כדי שההגדרה הזו תהיה בתוקף"
+ oauth2_json_avatar_path: "נתיב כתובת התמונה הייצוגית של המשתמש ב־JSON של ה־OAuth2 של המשתמש. למשל: user.avatar_url"
+ oauth2_email_verified: "נא לבדוק אם אתר זה עם OAuth2 אימת את הדוא״ל"
+ oauth2_overrides_email: "לעקוף את הדוא״ל של Discourse בדוא״ל חיצוני בכל כניסה למערכת. עובד כמו ההגדרה `auth_overrides_email` (אימות עוקף דוא״ל), אך הוא משמש נקודתית לכניסה עם OAuth2."
+ oauth2_send_auth_header: "שליחת פרטי גישה של לקוח בכותרת אימות (Authorization) של HTTP"
+ oauth2_send_auth_body: "שליחת פרטי גישה של לקוח בגוף הבקשה"
+ oauth2_debug_auth: "לכלול פירוט עשיר לטובת ניפוי שגיאות ביומנים שלך"
+ oauth2_authorize_options: "בעת בקשת אימות האפשרויות האלו"
+ oauth2_scope: "בעת בקשת אימות תחום זה"
+ oauth2_button_title: "הטקסט לכפתור ה־OAuth2"
+ oauth2_allow_association_change: לאפשר למשתמשים לנתק ולחבר מחדש את חשבונות ה־Discourse שלהם מספק ה־OAuth2
+ oauth2_disable_csrf: "השבתת בדיקת CSRF"
+ errors:
+ oauth2_fetch_user_details: "oauth2_callback_user_id_path חייב להיות נוכח לטובת נטרול של oauth2_fetch_user_details"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.hr.yml b/plugins/discourse-oauth2-basic/config/locales/server.hr.yml
new file mode 100644
index 00000000000..93343ce6e19
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.hu.yml b/plugins/discourse-oauth2-basic/config/locales/server.hu.yml
new file mode 100644
index 00000000000..ce81be1a54d
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.hu.yml
@@ -0,0 +1,20 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "Nem sikerült lekérni a felhasználói adatokat. Van aktív fiókja?"
+ site_settings:
+ oauth2_enabled: "Az egyéni OAuth2 engedélyezett"
+ oauth2_client_id: "Kliensazonosító az egyéni OAuth2-höz"
+ oauth2_client_secret: "Kliens titka az egyéni OAuth2-höz"
+ oauth2_authorize_url: "Az OAuth2 engedélyezési URL-je"
+ oauth2_authorize_signup_url: '(nem kötelező) A „Regisztráció” gomb használatakor használt alternatív engedélyezési URL'
+ oauth2_token_url: "Az OAuth2 token URL-je"
+ oauth2_token_url_method: "A Token URL lekéréséhez használt módszer"
+ oauth2_callback_user_id_path: "Útvonal a token válaszában a felhasználói azonosítóhoz. Például params.info.uuid"
+ oauth2_callback_user_info_paths: "Útvonalak a token válaszában más felhasználói tulajdonságokhoz. A támogatott tulajdonságok: name, username, email, email_verified és avatar. A formátuma tulajdonság:útvonal, például: name:params.info.name"
+ oauth2_fetch_user_details: "Felhasználói JSON lekérése az OAuth2-höz"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.hy.yml b/plugins/discourse-oauth2-basic/config/locales/server.hy.yml
new file mode 100644
index 00000000000..6a604469dc9
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.hy.yml
@@ -0,0 +1,23 @@
+# 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:
+ site_settings:
+ oauth2_enabled: "Մասնավոր OAuth2 -ը միացված է"
+ oauth2_client_id: "Հաճախորդի ID մասնավոր OAuth2 -ի համար"
+ oauth2_client_secret: "Հաճախորդի Գաղտնի Արժեք մասնավոր OAuth2 -ի համար"
+ oauth2_authorize_url: "Նույնականացման URL OAuth2 -ի համար"
+ oauth2_token_url: "Տոկենի URL OAuth2 -ի համար"
+ oauth2_token_url_method: "Տոկենի URL -ի բեռնման համար օգտագործվող մեթոդ"
+ oauth2_user_json_url: "OAuth2 -ի համար օգտատիրոջ JSON -ի բեռնման URL (նկատի ունեցեք, որ մենք փոխարինել ենք :id -ն OAuth կանչի կողմից վերադարձված id-ով և :token -ը՝ տոկենի id -ով)"
+ oauth2_user_json_url_method: "Օգտատիրոջ JSON URL -ի բեռնման համար օգտագործվող մեթոդ"
+ oauth2_json_user_id_path: "OAuth2 User JSON -ում ուղի դեպի օգտատիրոջ id. օրինակ՝ user.id"
+ oauth2_json_username_path: "OAuth2 User JSON t-ում ուղի դեպի օգտանուն, օրինակ՝ user.username"
+ oauth2_email_verified: "Ստուգել սա, եթե OAuth2 կայքը հաստատել է էլ. հասցեն"
+ oauth2_debug_auth: "Ներառել կարգաբերման հարուստ տեղեկատվություն Ձեր գրառումներում"
+ oauth2_authorize_options: "Նույնականացման ժամանակ պահանջել այս տարբերակները"
+ oauth2_scope: "Նույնականացման ժամանակ պահանջել այս սահմանը"
+ oauth2_button_title: "OAuth2 կոճակի տեքստ"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.id.yml b/plugins/discourse-oauth2-basic/config/locales/server.id.yml
new file mode 100644
index 00000000000..596e36b2e13
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.it.yml b/plugins/discourse-oauth2-basic/config/locales/server.it.yml
new file mode 100644
index 00000000000..fa13f1a9185
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.it.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "Impossibile recuperare i tuoi dettagli utente. Hai un account attivo?"
+ site_settings:
+ oauth2_enabled: "OAuth2 personalizzato abilitato"
+ oauth2_client_id: "ID client per OAuth2 personalizzato"
+ oauth2_client_secret: "Segreto client per OAuth2 personalizzato"
+ oauth2_authorize_url: "URL di autorizzazione per OAuth2"
+ oauth2_authorize_signup_url: '(facoltativo) URL di autorizzazione alternativo utilizzato quando si usa il pulsante "Registrati"'
+ oauth2_token_url: "URL del token per OAuth2"
+ oauth2_token_url_method: "Metodo utilizzato per recuperare l'URL del token"
+ oauth2_callback_user_id_path: "Percorso nella risposta del token all'id utente. es: params.info.uuid"
+ oauth2_callback_user_info_paths: "Percorsi nella risposta del token alle altre proprietà utente. Le proprietà supportate sono name, username, email, email_verified e avatar. Il formato è property:path, es: name:params.info.name"
+ oauth2_fetch_user_details: "Recupera il JSON dell'utente per OAuth2"
+ oauth2_user_json_url: "URL per recuperare il JOSN dell'utente per OAuth2 (nota: sostituiamo :id con l'id restituito dalla chiamata OAuth e :token con l'id token)"
+ oauth2_user_json_url_method: "Metodo utilizzato per recuperare l'URL JSON dell'utente"
+ oauth2_json_user_id_path: "Percorso nel JSON dell'utente OAuth2 per l'id utente. es.: user.id"
+ oauth2_json_username_path: "Percorso nel JSON dell'utente OAuth2 per il nome utente. es.: user.username"
+ oauth2_json_name_path: "Percorso nel JSON dell'utente OAuth2 per il nome completo. es.: user.name.full"
+ oauth2_json_email_path: "Percorso nel JSON dell'utente OAuth2 per l'email dell'utente. es.: user.email"
+ oauth2_json_email_verified_path: "Percorso nel JSON dell'utente OAuth2 per lo stato di verifica dell'email utente. Es.: user.email.verified. oauth2_email_verified deve essere disabilitato affinché questa impostazione abbia effetto."
+ oauth2_json_avatar_path: "Percorso nel JSON dell'utente OAuth2 per l'avatar dell'utente. es.: user.avatar_url"
+ oauth2_email_verified: "Abilita questa impostazione se il sito OAuth2 ha verificato \nl'email"
+ oauth2_overrides_email: "Sostituisci l'e-mail di Discourse con l'e-mail remota a ogni accesso. Funziona come l'impostazione `auth_overrides_email`, ma è specifica per gli accessi OAuth2."
+ oauth2_send_auth_header: "Invia le credenziali del client in un'intestazione di autorizzazione HTTP"
+ oauth2_send_auth_body: "Invia le credenziali del client nel corpo della richiesta"
+ oauth2_debug_auth: "Includi informazioni di debugging complete nei tuoi log"
+ oauth2_authorize_options: "In fase di autorizzazione, richiedi queste opzioni"
+ oauth2_scope: "In fase di autorizzazione, richiedi questo ambito"
+ oauth2_button_title: "Il testo per il pulsante OAuth2"
+ oauth2_allow_association_change: Consenti agli utenti di disconnettere e riconnettere i loro account Discourse dal fornitore OAuth2
+ oauth2_disable_csrf: "Disabilita il controllo CSRF"
+ errors:
+ oauth2_fetch_user_details: "oauth2_callback_user_id_path deve essere presente per disabilitare oauth2_fetch_user_details"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.ja.yml b/plugins/discourse-oauth2-basic/config/locales/server.ja.yml
new file mode 100644
index 00000000000..2cd3790d0d5
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.ja.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "ユーザー情報を取得できませんでした。アクティブなアカウントをお持ちですか?"
+ site_settings:
+ oauth2_enabled: "カスタム OAuth2 は有効です"
+ oauth2_client_id: "カスタム OAuth2 のクライアントID"
+ oauth2_client_secret: "カスタム OAuth2 のクライアントシークレット"
+ oauth2_authorize_url: "OAuth2 の認証 URL"
+ oauth2_authorize_signup_url: '(オプション)「登録」ボタンが使用される場合に使用される代替認証 URL'
+ oauth2_token_url: "OAuth2 のトークン URL"
+ oauth2_token_url_method: "トークン URL を取得するために使用されるメソッド"
+ oauth2_callback_user_id_path: "トークン応答内のユーザー ID へのパス。例: params.info.uuid"
+ oauth2_callback_user_info_paths: "トークン応答内の他のユーザープロパティへのパス。サポートされているプロパティは、name、username、email、email_verified、および avatar です。フォーマットは property:path です。例: name:params.info.name"
+ oauth2_fetch_user_details: "OAuth2 のユーザー JSON を取得する"
+ oauth2_user_json_url: "OAuth2 のユーザー JSON を取得するための URL(:id を OAuth の呼び出しが返す id に、:token を token id に置き換えることに注意してください)"
+ oauth2_user_json_url_method: "ユーザー JSON URL を取得するために使用されるメソッド"
+ oauth2_json_user_id_path: "OAuth2 ユーザー JSON 内のユーザー ID への パス。例: user.id"
+ oauth2_json_username_path: "OAuth2 ユーザー JSON 内のユーザー名へのパス。例: user.username"
+ oauth2_json_name_path: "OAuth2 ユーザー JSON 内のユーザーの氏名(フルネーム)へのパス。例: user.name.full"
+ oauth2_json_email_path: "OAuth2 ユーザー JSON 内のユーザーのメールアドレスへのパス。例: user.email"
+ oauth2_json_email_verified_path: "OAuth2 ユーザー JSON 内のユーザーのメールアドレス確認ステータスへのパス。例: user.email.verified。この設定を有効にするには、oauth2_email_verified を無効にする必要があります"
+ oauth2_json_avatar_path: "OAuth2 ユーザー JSON 内のユーザーのアバターへのパス。例: user.avatar_url"
+ oauth2_email_verified: "OAuth2 サイトがメールアドレスを確認した場合はこれをオンにする"
+ oauth2_overrides_email: "ログインのたびに、Discourse メールアドレスをリモートメールアドレスでオーバーライドする。 `auth_overrides_email` 設定と同様に機能しますが、OAuth2 ログインに特化しています。"
+ oauth2_send_auth_header: "クライアントの資格情報を HTTP 認証ヘッダーで送信する"
+ oauth2_send_auth_body: "クライアントの資格情報をリクエスト本文で送信する"
+ oauth2_debug_auth: "ログに詳細なデバッグ情報を含める"
+ oauth2_authorize_options: "承認中にこれらのオプションをリクエストする"
+ oauth2_scope: "承認中にこの範囲をリクエストする"
+ oauth2_button_title: "OAuth2 ボタンのテキスト"
+ oauth2_allow_association_change: ユーザーが OAuth2 プロバイダーから Discourse アカウントを切断または再接続することを許可する
+ oauth2_disable_csrf: "CSRF チェックを無効にする"
+ errors:
+ oauth2_fetch_user_details: "oauth2_fetch_user_details を無効にするには、oauth2_callback_user_id_path が存在する必要があります"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.ko.yml b/plugins/discourse-oauth2-basic/config/locales/server.ko.yml
new file mode 100644
index 00000000000..7c92c5253eb
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.ko.yml
@@ -0,0 +1,35 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "사용자 세부 정보를 검색 할 수 없습니다. 활성 계정이 있습니까?"
+ site_settings:
+ oauth2_enabled: "맞춤 OAuth2가 사용 설정되었습니다."
+ oauth2_client_id: "사용자 정의 OAuth2의 클라이언트 ID"
+ oauth2_client_secret: "커스텀 OAuth2를위한 클라이언트 시크릿"
+ oauth2_authorize_url: "OAuth2의 인증 URL"
+ oauth2_token_url: "OAuth2의 토큰 URL"
+ oauth2_token_url_method: "토큰 URL을 가져 오는 데 사용되는 방법"
+ oauth2_callback_user_id_path: "사용자 ID에 대한 토큰 응답의 경로입니다. 예 : params.info.uuid"
+ oauth2_callback_user_info_paths: "다른 사용자 속성에 대한 토큰 응답의 경로 지원되는 속성은 이름, 사용자 이름, 이메일, email_verified 및 아바타입니다. 형식은 property : path입니다 (예 : name : params.info.name)."
+ oauth2_fetch_user_details: "OAuth2 용 사용자 JSON 가져 오기"
+ oauth2_user_json_url: "OAuth2 용 사용자 JSON을 가져 오는 URL (: 우리는 : Auth를 OAuth 호출에서 반환 한 ID로 대체하고 : token을 토큰 ID로 대체합니다)"
+ oauth2_user_json_url_method: "사용자 JSON URL을 가져 오는 데 사용되는 메소드"
+ oauth2_json_user_id_path: "OAuth2 사용자 JSON에서 사용자 ID의 경로입니다. 예 : user.id"
+ oauth2_json_username_path: "OAuth2 사용자 JSON에서 사용자 이름으로의 경로입니다. 예 : user.username"
+ oauth2_json_name_path: "OAuth2 사용자 JSON에서 사용자의 전체 경로입니다. 예 : user.name.full"
+ oauth2_json_email_path: "OAuth2 사용자 JSON에서 사용자의 이메일 경로입니다. 예 : user.email"
+ oauth2_json_email_verified_path: "OAuth2 사용자 JSON의 경로를 사용자의 이메일 확인 상태로 지정하십시오. 예 : user.email.verified. 이 설정을 적용하려면 oauth2_email_verified를 비활성화해야합니다"
+ oauth2_json_avatar_path: "Oauth2 사용자 JSON에서 사용자 아바타의 경로입니다. 예 : user.avatar_url"
+ oauth2_email_verified: "OAuth2 사이트에서 이메일을 확인한 경우이를 확인하십시오."
+ oauth2_debug_auth: "로그에 풍부한 디버깅 정보 포함"
+ oauth2_authorize_options: "요청을 승인 할 때 이러한 옵션"
+ oauth2_scope: "이 범위 요청을 승인 할 때"
+ oauth2_button_title: "OAuth2 버튼의 텍스트"
+ oauth2_allow_association_change: 사용자가 OAuth2 공급자와의 담화 계정 연결을 끊었다가 다시 연결하도록 허용
+ errors:
+ oauth2_fetch_user_details: "oauth2_fetch_user_details를 비활성화하려면 oauth2_callback_user_id_path가 있어야합니다."
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.lt.yml b/plugins/discourse-oauth2-basic/config/locales/server.lt.yml
new file mode 100644
index 00000000000..16bb19758dc
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.lv.yml b/plugins/discourse-oauth2-basic/config/locales/server.lv.yml
new file mode 100644
index 00000000000..59e0ef6f4ed
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.nb_NO.yml b/plugins/discourse-oauth2-basic/config/locales/server.nb_NO.yml
new file mode 100644
index 00000000000..2e2224d1472
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.nl.yml b/plugins/discourse-oauth2-basic/config/locales/server.nl.yml
new file mode 100644
index 00000000000..d014efc1af3
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.nl.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "Kon je gebruikersgegevens niet ophalen. Heb je een actief account?"
+ site_settings:
+ oauth2_enabled: "Aangepaste OAuth2 is ingeschakeld"
+ oauth2_client_id: "Client-ID voor aangepaste OAuth2"
+ oauth2_client_secret: "Clientgeheim voor aangepaste OAuth2"
+ oauth2_authorize_url: "Autorisatie-URL voor OAuth2"
+ oauth2_authorize_signup_url: '(optioneel) Alternatieve autorisatie-URL die wordt gebruikt wanneer de knop "Registreren" wordt gebruikt'
+ oauth2_token_url: "Token-URL voor OAuth2"
+ oauth2_token_url_method: "Gebruikte methode voor ophalen van de token-URL"
+ oauth2_callback_user_id_path: "Pad in het tokenantwoord naar de gebruikers-ID, bijvoorbeeld params.info.uuid"
+ oauth2_callback_user_info_paths: "Paden in het tokenantwoord voor andere gebruikerseigenschappen. Ondersteunde eigenschappen zijn name, username, email, email_verified en avatar. De notatie is property:path, bijvoorbeeld name:params.info.name"
+ oauth2_fetch_user_details: "Gebruikers-JSON voor OAuth2 ophalen"
+ oauth2_user_json_url: "URL voor het ophalen van de gebruikers-JSON voor OAuth2 (we vervangen :id vervangen door de geretourneerde ID van de OAuth-aanroep en :token door de token-ID)"
+ oauth2_user_json_url_method: "Gebruikte methode voor ophalen van de gebruikers-JSON"
+ oauth2_json_user_id_path: "Pad in de OAuth2-gebruikers-JSON naar de gebruikers-ID, bijvoorbeeld user.id"
+ oauth2_json_username_path: "Pad in de OAuth2-gebruikers-JSON naar de gebruikersnaam, bijvoorbeeld user.username"
+ oauth2_json_name_path: "Pad in de OAuth2-gebruikers-JSON naar de volledige naam van de gebruiker, bijvoorbeeld user.name.full"
+ oauth2_json_email_path: "Pad in de OAuth2-gebruikers-JSON naar het e-mailadres van de gebruiker, bijvoorbeeld user.email"
+ oauth2_json_email_verified_path: "Pad in de OAuth2-gebruikers-JSON naar de e-mailverificatiestatus van de gebruiker, bijvoorbeeld user.email.verified. Deze instelling heeft alleen effect als oauth2_email_verified is uitgeschakeld"
+ oauth2_json_avatar_path: "Pad in de Oauth2-gebruikers-JSON naar de avatar van de gebruiker, bijvoorbeeld user.avatar_url"
+ oauth2_email_verified: "Controleer dit als de OAuth2-site het e-mailadres heeft geverifieerd"
+ oauth2_overrides_email: "Overschrijf het Discourse-e-mailadres met het externe e-mailadres bij elke aanmelding. Werkt hetzelfde als de instelling `auth_overrides_email`, maar is specifiek voor OAuth2-aanmeldingen."
+ oauth2_send_auth_header: "Clientaanmeldgegevens sturen in een HTTP-autorisatieheader"
+ oauth2_send_auth_body: "Clientaanmeldgegevens sturen in verzoektekst"
+ oauth2_debug_auth: "Uitgebreide debuggegevens opnemen in je logs"
+ oauth2_authorize_options: "Deze opties verzoeken bij autoriseren"
+ oauth2_scope: "Dit bereik verzoeken bij autoriseren"
+ oauth2_button_title: "De tekst voor de OAuth2-knop"
+ oauth2_allow_association_change: Gebruikers toestaan hun Discourse-account te ontkoppelen van de OAuth2-provider en opnieuw te koppelen
+ oauth2_disable_csrf: "CSRF-controle uitschakelen"
+ errors:
+ oauth2_fetch_user_details: "oauth2_callback_user_id_path moet aanwezig zijn om oauth2_fetch_user_details uit te schakelen"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.pl_PL.yml b/plugins/discourse-oauth2-basic/config/locales/server.pl_PL.yml
new file mode 100644
index 00000000000..c6d56194fde
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.pl_PL.yml
@@ -0,0 +1,31 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "Nie mogliśmy odnaleźć informacji o Twoim użytkowniku. Czy Twoje konto jest aktywne?"
+ site_settings:
+ oauth2_enabled: "Niestandardowy OAuth2 jest włączony"
+ oauth2_client_id: "Client ID dla własnego OAuth2"
+ oauth2_client_secret: "Client Secret dla własnego OAuth2"
+ oauth2_authorize_url: "Adres URL autoryzacji dla OAuth2"
+ oauth2_token_url: "Token URL dla OAuth2"
+ oauth2_token_url_method: "Metoda używana do pozyskania URL tokenu"
+ oauth2_callback_user_id_path: "Ścieżka w tokenie-odpowiedzi do ID użytkownika, np. params.info.uuid"
+ oauth2_callback_user_info_paths: "Ścieżka w tokenie-odpowiedzi do innych właściwości użytkownika. Wspierane właściwości to nazwa, nazwa użytkownika, email, informacja czy email został zweryfikowany, awatar. Format to właściwość:ścieżka, np. name:params.info.name"
+ oauth2_fetch_user_details: "Pobierz JSON użytkownika dla OAuth2"
+ oauth2_user_json_url: "URL do pozyskania użytkownika JSON dla OAuth2 (pamiętaj, ze zamieniliśmy :id ID zwracanym przez OAuth i :token ID tokenu)"
+ oauth2_user_json_url_method: "Metoda używana do pozyskania JSON URL użytkownika"
+ oauth2_json_user_id_path: "Ścieżka w JSON‐ie użytkownika OAuth2 do ID użytkownika, np.: user.id"
+ oauth2_json_username_path: "Ścieżka w JSON‐ie użytkownika OAuth2 do nazwy użytkownika, np.: user.username"
+ oauth2_email_verified: "Sprawdź to, czy witryna OAuth2 zweryfikowała adres e-mail"
+ oauth2_debug_auth: "Umieść bogate informacje debugowania w swoich logach"
+ oauth2_authorize_options: "Przy autoryzacji wymagaj tych opcji"
+ oauth2_scope: "Przy autoryzacji wymagaj tego zakresu"
+ oauth2_button_title: "Tekst dla przycisku OAuth2"
+ oauth2_allow_association_change: Zezwól użytkownikom na odłączanie i ponowne łączenie ich kont Discourse od providera OAuth2
+ errors:
+ oauth2_fetch_user_details: "oauth2_callback_user_id_path musi być obecne, by dezaktywować oauth2_fetch_user_details"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.pt.yml b/plugins/discourse-oauth2-basic/config/locales/server.pt.yml
new file mode 100644
index 00000000000..72330b202f2
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.pt.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:
+ login:
+ authenticator_error_fetch_user_details: "Não foi possível recuperar os detalhes do utilizador. Tem uma conta ativa?"
+ site_settings:
+ oauth2_enabled: "OAuth2 personalizada está ativada"
+ oauth2_client_id: "Id. do cliente para OAuth2 personalizada"
+ oauth2_client_secret: "Segredo de Cliente para OAuth2 personalizada"
+ oauth2_authorize_url: "URL de autorização para OAuth2"
+ oauth2_token_url: "URL do código para OAuth2"
+ oauth2_token_url_method: "Método utilizado para obter o URL do Código"
+ oauth2_fetch_user_details: "Obter JSON do utilizador para OAuth2"
+ oauth2_user_json_url_method: "Método utilizado para obter o URL de JSON do utilizador"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.pt_BR.yml b/plugins/discourse-oauth2-basic/config/locales/server.pt_BR.yml
new file mode 100644
index 00000000000..19c2a214ec0
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.pt_BR.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "Não foi possível recuperar os detalhes do(a) usuário(a). Você tem uma conta ativa?"
+ site_settings:
+ oauth2_enabled: "OAuth2 Personalizado está ativado"
+ oauth2_client_id: "ID do cliente para o OAuth2 personalizado"
+ oauth2_client_secret: "Segredo do cliente para o OAuth2 personalizado"
+ oauth2_authorize_url: "URL de autorização para o OAuth2"
+ oauth2_authorize_signup_url: '(opcional) URL de autorização alternativa usada quando o botão “Inscrever-se” é usado'
+ oauth2_token_url: "URL do token para o OAuth2"
+ oauth2_token_url_method: "Método usado para buscar a URL do token"
+ oauth2_callback_user_id_path: "Caminho no JSON do(a) Usuário(a) do OAuth2 para a ID do(a) usuário(a). ex: params.info.uuid"
+ oauth2_callback_user_info_paths: "Caminhos na resposta do token para outras propriedades do(a) usuário(a). As propriedades suportadas são nome, nome do(a) usuário(a), e-mail, email_verified e avatar. O formato é propriedade: caminho. Por exemplo: name:params.info.name"
+ oauth2_fetch_user_details: "Buscar JSON do(a) usuário(a) para OAuth2"
+ oauth2_user_json_url: "URL para buscar o JSON do(a) usuário(a) para o OAuth2 (observe que substituímos :id pela id retornada pela chamada OAuth e :token pela id do token)"
+ oauth2_user_json_url_method: "Método usado para buscar a URL do JSON do(a) usuário(a)"
+ oauth2_json_user_id_path: "Caminho no JSON do(a) Usuário(a) do OAuth2 para a ID do(a) usuário(a). ex: user.id"
+ oauth2_json_username_path: "Caminho no JSON do(a) Usuário(a) do OAuth2 para o nome do(a) usuário(a). ex: user.username"
+ oauth2_json_name_path: "Caminho no JSON do(a) usuário(a) do OAuth2 para o nome do(a) usuário(a). ex: user.name.full"
+ oauth2_json_email_path: "Caminho no JSON do(a) usuário(a) do OAuth2 para o e-mail do(a) usuário(a). ex: user.email"
+ oauth2_json_email_verified_path: "Caminho no JSON do(a) usuário(a) do OAuth2 para o estado de verificação do e-mail do(a) usuário(a).,ex: user.email.verified. oauth2_email_verified deve estar desativado para esta configuração ter efeito"
+ oauth2_json_avatar_path: "Caminho no JSON do(a) usuário(a) do OAuth2 para o avatar do(a) usuário(a). ex: user.avatar_url"
+ oauth2_email_verified: "Verificar se o site do OAuth2 confirmou o e-mail"
+ oauth2_overrides_email: "Substitua o e-mail do Discourse pelo e-mail remoto toda vez que entrar. Funciona igual à configuração `auth_overrides_email`, mas é específica para logins do OAuth2"
+ oauth2_send_auth_header: "Enviar credenciais de cliente em um cabeçalho de autorização do HTTP"
+ oauth2_send_auth_body: "Enviar credenciais de cliente no corpo da solicitação"
+ oauth2_debug_auth: "Incluir informações de depuração avançadas em seus registros"
+ oauth2_authorize_options: "Ao autorizar, solicite estas opções"
+ oauth2_scope: "Ao autorizar, solicite este escopo"
+ oauth2_button_title: "O texto para o botão do OAuth2"
+ oauth2_allow_association_change: Permitir que usuários(as) desconectem e reconectem suas contas do Discourse no provedor do OAuth2
+ oauth2_disable_csrf: "Desativar verificação CSRF"
+ errors:
+ oauth2_fetch_user_details: "oauth2_callback_user_id_path deve estar presente para desativar oauth2_fetch_user_details"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.ro.yml b/plugins/discourse-oauth2-basic/config/locales/server.ro.yml
new file mode 100644
index 00000000000..08a77f812ee
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.ru.yml b/plugins/discourse-oauth2-basic/config/locales/server.ru.yml
new file mode 100644
index 00000000000..ee3b090c220
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.ru.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "Не удалось получить данные пользователя. У вас есть активный аккаунт?"
+ site_settings:
+ oauth2_enabled: "Пользовательский OAuth2 включен"
+ oauth2_client_id: "Идентификатор клиента для пользовательского OAuth2"
+ oauth2_client_secret: "Секрет клиента для пользовательских OAuth2"
+ oauth2_authorize_url: "URL авторизации для OAuth2"
+ oauth2_authorize_signup_url: '(необязательно) Альтернативный URL-адрес авторизации, используемый при задействовании кнопки ''Зарегистрироваться'''
+ oauth2_token_url: "URL токена для OAuth2"
+ oauth2_token_url_method: "Метод, используемый для получения URL токена"
+ oauth2_callback_user_id_path: "Путь в ответе токена к идентификатору пользователя. например: params.info.uuid"
+ oauth2_callback_user_info_paths: "Пути в ответе токена к другим параметрам пользователя. Поддерживаемые параметры: name, username, email, email_verified и avatar. Формат указывается в виде 'свойство: путь', например: name:params.info.name"
+ oauth2_fetch_user_details: "Получить USER JSON для OAuth2"
+ oauth2_user_json_url: "URL для получения USER JSON для OAuth2 (обратите внимание, мы заменяем: id на идентификатор, возвращаемый вызовом OAuth, и :token - идентификатором токена)"
+ oauth2_user_json_url_method: "Метод, используемый для получения USER URL JSON"
+ oauth2_json_user_id_path: "Путь в OAuth2 User JSON к идентификатору пользователя. например: user.id"
+ oauth2_json_username_path: "Путь в OAuth2 User JSON к имени пользователя. например: user.username"
+ oauth2_json_name_path: "Путь в OAuth2 User JSON к полному имени пользователя. Например: user.name.full"
+ oauth2_json_email_path: "Путь в OAuth2 User JSON к электронной почте пользователя. например: user.email"
+ oauth2_json_email_verified_path: "Путь в OAuth2 User JSON к состоянию проверки электронной почты пользователя. Например: user.email.verified. oauth2_email_verified должен быть отключен, чтобы этот параметр имел какой-либо эффект"
+ oauth2_json_avatar_path: "Путь в Oauth2 User JSON к аватару пользователя. например: user.avatar_url"
+ oauth2_email_verified: "Включите эту настройку, если OAuth2-сайт подтвердил адрес электронной почты."
+ oauth2_overrides_email: "Заменять электронную почту Discourse удалённой электронной почтой при каждом входе в систему. Работает так же, как параметр `auth_overrides_email`, но только при входе в систему через OAuth2."
+ oauth2_send_auth_header: "Отправлять учетные данные клиента в заголовке HTTP-запроса"
+ oauth2_send_auth_body: "Отправлять учетные данные клиента в теле запроса"
+ oauth2_debug_auth: "Добавлять в журнал расширенную отладочную информацию"
+ oauth2_authorize_options: "При авторизации запрашивать эти параметры"
+ oauth2_scope: "При авторизации запрашивать эту область"
+ oauth2_button_title: "Текст для кнопки 'OAuth2'"
+ oauth2_allow_association_change: Разрешить пользователям отключать и повторно подключать свои учётные записи Discourse от поставщика OAuth2
+ oauth2_disable_csrf: "Отключить проверку CSRF"
+ errors:
+ oauth2_fetch_user_details: "Для отключения 'oauth2_fetch_user_details' должен быть настроен параметр 'oauth2_callback_user_id_path'"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.sk.yml b/plugins/discourse-oauth2-basic/config/locales/server.sk.yml
new file mode 100644
index 00000000000..6f815624081
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.sl.yml b/plugins/discourse-oauth2-basic/config/locales/server.sl.yml
new file mode 100644
index 00000000000..23489a48b1f
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.sq.yml b/plugins/discourse-oauth2-basic/config/locales/server.sq.yml
new file mode 100644
index 00000000000..7f051b7a7cf
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.sr.yml b/plugins/discourse-oauth2-basic/config/locales/server.sr.yml
new file mode 100644
index 00000000000..88d63d6ae1a
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.sv.yml b/plugins/discourse-oauth2-basic/config/locales/server.sv.yml
new file mode 100644
index 00000000000..eedac50d569
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.sv.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "Det gick inte att hämta dina användaruppgifter. Har du ett aktivt konto?"
+ site_settings:
+ oauth2_enabled: "Anpassad OAuth2 är aktiverad"
+ oauth2_client_id: "Klient-ID för anpassad OAuth2"
+ oauth2_client_secret: "Klienthemlighet för anpassad OAuth2"
+ oauth2_authorize_url: "Autoriserings-URL för OAuth2"
+ oauth2_authorize_signup_url: '(valfritt) Alternativ auktoriserings-URL som används när knappen "Registrera dig" används'
+ oauth2_token_url: "Bevis-URL för OAuth2"
+ oauth2_token_url_method: "Metod som används för att hämta bevis-URL"
+ oauth2_callback_user_id_path: "Sökväg i bevissvaret på användar-ID. t.ex. params.info.uuid"
+ oauth2_callback_user_info_paths: "Sökvägar i bevissvaret på andra användaregenskaper. Egenskaper som stöds är namn, användarnamn, e-postadress, verifierad e-postadress och avatar. Formatet är egenskap:sökväg, t.ex. name:params.info.name"
+ oauth2_fetch_user_details: "Hämta användarens JSON för OAuth2"
+ oauth2_user_json_url: "URL för att hämta användarens JSON för OAuth2 (observera att vi ersätter :id med det ID som returneras av OAuth-anrop och :token med bevisets ID)"
+ oauth2_user_json_url_method: "Metod som används för att hämta användarens JSON-URL"
+ oauth2_json_user_id_path: "Sökväg i OAuth2-användarens JSON till användar-ID:et, t.ex.: user.id"
+ oauth2_json_username_path: "Sökväg i OAuth2-användarens JSON till användarnamnet, t.ex. user.username"
+ oauth2_json_name_path: "Sökväg i OAuth2-användarens JSON till användarens fullständiga namn: user.name.full"
+ oauth2_json_email_path: "Sökväg i OAuth2-användarens JSON till användarens e-postadress: user.email"
+ oauth2_json_email_verified_path: "Sökväg i OAuth2-användarens JSON till verifieringsstatus för användarens e-postadress: user.email.verified. oauth2_email_verified måste ha inaktiverats för att den här inställningen ska ha någon verkan"
+ oauth2_json_avatar_path: "Sökväg i Oauth2-användaren JSON till användarens avatar: user.avatar_url"
+ oauth2_email_verified: "Kontrollera detta om OAuth2-webbplatsen har verifierat e-postadressen"
+ oauth2_overrides_email: "Skriv över Discourse e-postadressen med externa e-postadressen vid varje inloggning. Fungerar precis som inställningen `auth_overrides_email` men är specifik för OAuth2-inloggningar."
+ oauth2_send_auth_header: "Skicka klientbehörighet i rubriken för HTTP-auktorisation"
+ oauth2_send_auth_body: "Skicka klientbehörighet i begärans meddelandetext"
+ oauth2_debug_auth: "Omfatta utförlig felsökningsinformation i dina loggar"
+ oauth2_authorize_options: "Begär dessa alternativ vid auktorisering"
+ oauth2_scope: "Begär detta omfång vid auktorisering"
+ oauth2_button_title: "Texten för OAuth2-knappen"
+ oauth2_allow_association_change: Låt användarna frånkoppla och ansluta sina Discourse-konton igen från OAuth2-leverantören
+ oauth2_disable_csrf: "Inaktivera CSRF-kontroll"
+ errors:
+ oauth2_fetch_user_details: "oauth2_callback_user_id_path måste vara närvarande för att inaktivera oauth2_fetch_user_details"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.sw.yml b/plugins/discourse-oauth2-basic/config/locales/server.sw.yml
new file mode 100644
index 00000000000..64f5e60bbad
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.sw.yml
@@ -0,0 +1,14 @@
+# 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:
+ site_settings:
+ oauth2_enabled: "Custom OAuth2 imeruhusiwa"
+ oauth2_client_id: "Utambulisho wa Mteja kwa ajili ya OAuth2 binafsi"
+ oauth2_client_secret: "Mteja wa Siri wa OAuth2 binafsi"
+ oauth2_token_url_method: "Njia inayotumika kupata anwani ya Token"
+ oauth2_user_json_url_method: "Njia inayotumika kupata anwani ya JSON ya mtumiaji"
+ oauth2_email_verified: "Angalia hii kama tovuti ya OAuth2 imethibitisha barua pepe"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.te.yml b/plugins/discourse-oauth2-basic/config/locales/server.te.yml
new file mode 100644
index 00000000000..03967bdbb07
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.th.yml b/plugins/discourse-oauth2-basic/config/locales/server.th.yml
new file mode 100644
index 00000000000..7de85ff91c4
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.tr_TR.yml b/plugins/discourse-oauth2-basic/config/locales/server.tr_TR.yml
new file mode 100644
index 00000000000..7689a034be6
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.tr_TR.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "Kullanıcı ayrıntılarınız görüntülenemedi. Aktif bir hesabınız var mı?"
+ site_settings:
+ oauth2_enabled: "Özel OAuth2 etkin"
+ oauth2_client_id: "Özel OAuth2 için müşteri kimliği"
+ oauth2_client_secret: "Özel OAuth2 için İstemci Sırrı"
+ oauth2_authorize_url: "OAuth2 için yetkilendirme URL'si"
+ oauth2_authorize_signup_url: '(isteğe bağlı) "Kaydol" düğmesi kullanıldığında kullanılan alternatif yetkilendirme URL''si'
+ oauth2_token_url: "OAuth2 için Token URL'si"
+ oauth2_token_url_method: "Token URL'sini getirmek için kullanılan yöntem"
+ oauth2_callback_user_id_path: "Token yanıtında kullanıcı kimliğine giden yol. ör.: params.info.uuid"
+ oauth2_callback_user_info_paths: "Token yanıtındaki diğer kullanıcı özelliklerine giden yollar. Desteklenen özellikler name, username, email, email_verified ve avatar'dır. Biçim özellik:yol şeklindedir, ör.: name:params.info.name"
+ oauth2_fetch_user_details: "OAuth2 için kullanıcı JSON'unu getir"
+ oauth2_user_json_url: "OAuth2 için kullanıcı JSON'unu alma URL'si (:id'yi OAuth çağrısı tarafından döndürülen id ile ve :token'ı token id ile değiştirdiğimize dikkat edin)"
+ oauth2_user_json_url_method: "Kullanıcı JSON URL'sini getirmek için kullanılan yöntem"
+ oauth2_json_user_id_path: "OAuth2 Kullanıcı JSON'unda kullanıcı kimliğine giden yol. ör.: user.id"
+ oauth2_json_username_path: "OAuth2 Kullanıcı JSON'unda kullanıcı adına giden yol. ör.: user.username"
+ oauth2_json_name_path: "OAuth2 Kullanıcı JSON'unda kullanıcının tam adına giden yol. ör.: user.name.full"
+ oauth2_json_email_path: "OAuth2 Kullanıcı JSON'unda kullanıcının e-postasına giden yol. ör.: user.email"
+ oauth2_json_email_verified_path: "OAuth2 Kullanıcı JSON'unda kullanıcının e-posta doğrulama durumuna giden yol. ör.: user.email.verified. oauth2_email_verified, bu ayarın herhangi bir etkiye sahip olması için devre dışı bırakılmalıdır"
+ oauth2_json_avatar_path: "Oauth2 Kullanıcı JSON'unda kullanıcının avatarına giden yol. ör.: user.avatar_url"
+ oauth2_email_verified: "OAuth2 sitesi e-postayı doğruladıysa bunu kontrol edin"
+ oauth2_overrides_email: "Her oturum açma işleminde Discourse e-postasını uzak e-posta ile geçersiz kılın. \"auth_overrides_email\" ayarı ile aynı şekilde çalışır, ancak OAuth2 girişlerine özeldir."
+ oauth2_send_auth_header: "İstemci kimlik bilgilerini HTTP Yetkilendirme üstbilgisinde gönderin"
+ oauth2_send_auth_body: "İstemci kimlik bilgilerini talep gövdesinde gönderin"
+ oauth2_debug_auth: "Günlüklerinize zengin hata ayıklama bilgileri ekleyin"
+ oauth2_authorize_options: "Yetkilendirirken bu seçenekleri isteyin"
+ oauth2_scope: "Yetkilendirirken bu kapsamı isteyin"
+ oauth2_button_title: "OAuth2 düğmesinin metni"
+ oauth2_allow_association_change: Kullanıcıların Discourse hesaplarının bağlantısını OAuth2 sağlayıcısından kesmelerine ve yeniden bağlamalarına izin verin
+ oauth2_disable_csrf: "CSRF kontrolünü devre dışı bırakın"
+ errors:
+ oauth2_fetch_user_details: "oauth2_fetch_user_details'ı devre dışı bırakmak için oauth2_callback_user_id_path mevcut olmalıdır"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.ug.yml b/plugins/discourse-oauth2-basic/config/locales/server.ug.yml
new file mode 100644
index 00000000000..a6bf0185ae2
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.uk.yml b/plugins/discourse-oauth2-basic/config/locales/server.uk.yml
new file mode 100644
index 00000000000..f62cbb7cffc
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.uk.yml
@@ -0,0 +1,14 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "Не вдалося отримати дані користувача. У вас є активний обліковий запис?"
+ site_settings:
+ oauth2_authorize_options: "Під час авторизації запитувати ці параметри"
+ oauth2_scope: "Під час авторизації запитувати ці дані"
+ oauth2_button_title: "Текст кнопки OAuth2"
+ oauth2_allow_association_change: Дозволити користувачам відключати та знову підключати свої облікові записи від постачальника OAuth2 в Discourse
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.ur.yml b/plugins/discourse-oauth2-basic/config/locales/server.ur.yml
new file mode 100644
index 00000000000..f0d516b93cc
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.ur.yml
@@ -0,0 +1,31 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "آپ کی صارف تفصیلات کو حاصل نہیں کیا جا سکا۔ کیا آپ کے پاس ایک فعال اکاؤنٹ ہے؟"
+ site_settings:
+ oauth2_enabled: "اپنی مرضی کا OAuth2 فعال ہے"
+ oauth2_client_id: "اپنی مرضی کے OAuth2 کیلئے کلائنٹ ائی ڈی"
+ oauth2_client_secret: "اپنی مرضی کے OAuth2 کیلئے کلائنٹ سیکرٹ"
+ oauth2_authorize_url: "OAuth2 کے لئے اَوتھرٰیزیشن URL"
+ oauth2_token_url: "OAuth2 کیلئے ٹوکن URL"
+ oauth2_token_url_method: "ٹوکن URL حاصل کرنے کا طریقہ"
+ oauth2_callback_user_id_path: "ٹَوکن جواب میں صارف آئی ڈیکا پاتھ۔ مثال: params.info.uuid"
+ oauth2_callback_user_info_paths: " ٹَوکن جواب میں دیگر صارف خصوصیات کے پاتھ۔ معاون خصوصیات، نام، صارف نام، ایمیل، ایمیل_توثیق_شدہ اور اوتار ہیں۔ فارمیٹ ہے property:path، مثال: name:params.info.name"
+ oauth2_fetch_user_details: "OAuth2 کیلئے صارف JSON حاصل کریں"
+ oauth2_user_json_url: "OAuth2 کیلئے صارف کا JSON حاصل کرنے کا URL (نوٹ کریں کہ ہم :id کو OAuth کال سے حاصل ہوئی id اور :token کو ٹوکن id سے تبدیل کر دیتے ہیں)"
+ oauth2_user_json_url_method: "صارف JSON URL حاصل کرنے کا طریقہ"
+ oauth2_json_user_id_path: "OAuth2 صارف JSON میں صارف آئی ڈی کا پاتھ۔ مثال: user.id"
+ oauth2_json_username_path: "OAuth2 صارف JSON میں صارف نام کا پاتھ۔ مثال: user.username"
+ oauth2_email_verified: "اِس کو چیک لگائیں اگر OAuth2 سائٹ نے ای مَیل کی توثیق کی ہوئی ہے"
+ oauth2_debug_auth: "اپنے لاگز میں رِچ ڈیبگنگ معلومات شامل کریں"
+ oauth2_authorize_options: "جب اَوتھرٰیز کیا جا رہا ہو تو اِن اختیارات کی درخواست کریں"
+ oauth2_scope: "اَوتھرائز کرتے وقت اِس سکَوپ کی درخواست کریں"
+ oauth2_button_title: "OAuth2 بٹن کیلئے متن"
+ oauth2_allow_association_change: صارفین کو OAuth2 فراہم کنندہ سے اپنے ڈِسکَورس اکاؤنٹس کو منقطع اور دوبارہ کنیکٹ کرنے کی اجازت دیں
+ errors:
+ oauth2_fetch_user_details: "oauth2_fetch_user_details غیر فعال کرنے کیلئے oauth2_callback_user_id_path کا موجود ہونا لاذمی ہے"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.vi.yml b/plugins/discourse-oauth2-basic/config/locales/server.vi.yml
new file mode 100644
index 00000000000..f629dcf5329
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/locales/server.zh_CN.yml b/plugins/discourse-oauth2-basic/config/locales/server.zh_CN.yml
new file mode 100644
index 00000000000..869def84585
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/locales/server.zh_CN.yml
@@ -0,0 +1,40 @@
+# 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:
+ login:
+ authenticator_error_fetch_user_details: "无法检索您的用户详细信息。您有活跃帐户吗?"
+ site_settings:
+ oauth2_enabled: "自定义 OAuth2 已启用"
+ oauth2_client_id: "自定义 OAuth2 的客户端 ID"
+ oauth2_client_secret: "自定义 OAuth2 的客户端密钥"
+ oauth2_authorize_url: "OAuth2 的授权 URL"
+ oauth2_authorize_signup_url: '(可选)使用“注册”按钮时使用的替代授权 URL'
+ oauth2_token_url: "OAuth2 的令牌 URL"
+ oauth2_token_url_method: "用于获取令牌 URL 的方法"
+ oauth2_callback_user_id_path: "令牌响应中用户 ID 的路径。例如:params.info.uuid"
+ oauth2_callback_user_info_paths: "令牌响应中其他用户属性的路径。支持的属性包括 name、username、email、email_verified 和 avatar。格式为 property:path,例如:name:params.info.name"
+ oauth2_fetch_user_details: "获取 OAuth2 的用户 JSON"
+ oauth2_user_json_url: "用于获取 OAuth2 的用户 JSON 的 URL(请注意,我们将 :id 替换为 OAuth 调用返回的 ID,将 :token 替换为令牌 ID)"
+ oauth2_user_json_url_method: "用于获取用户 JSON URL 的方法"
+ oauth2_json_user_id_path: "OAuth2 用户 JSON 中用户 ID 的路径。例如:user.id"
+ oauth2_json_username_path: "OAuth2 用户 JSON 中用户名的路径。例如:user.username"
+ oauth2_json_name_path: "OAuth2 用户 JSON 中用户全名的路径。例如:user.name.full"
+ oauth2_json_email_path: "OAuth2 用户 JSON 中用户电子邮件的路径。例如:user.email"
+ oauth2_json_email_verified_path: "OAuth2 用户 JSON 中用户电子邮件验证状态的路径。例如:user.email.verified。要使该设置生效,必须禁用 oauth2_email_verified"
+ oauth2_json_avatar_path: "OAuth2 用户 JSON 中用户头像的路径。例如:user.avatar_url"
+ oauth2_email_verified: "如果 OAuth2 站点已验证电子邮件,请选中此项"
+ oauth2_overrides_email: "在每次登录时使用远程电子邮件替换 Discourse 电子邮件。工作方式与 `auth_overrides_email` 设置相同,但特定于 OAuth2 登录。"
+ oauth2_send_auth_header: "在 HTTP 授权标头中发送客户端凭据"
+ oauth2_send_auth_body: "在请求正文中发送客户端凭据"
+ oauth2_debug_auth: "在日志中包含丰富的调试信息"
+ oauth2_authorize_options: "授权时请求这些选项"
+ oauth2_scope: "授权请求此范围时"
+ oauth2_button_title: "OAuth2 按钮的文本"
+ oauth2_allow_association_change: 允许用户从 OAuth2 提供商断开并重新连接他们的 Discourse 帐户
+ oauth2_disable_csrf: "禁用 CSRF 检查"
+ errors:
+ oauth2_fetch_user_details: "必须存在 oauth2_callback_user_id_path 才能禁用 oauth2_fetch_user_details"
diff --git a/plugins/discourse-oauth2-basic/config/locales/server.zh_TW.yml b/plugins/discourse-oauth2-basic/config/locales/server.zh_TW.yml
new file mode 100644
index 00000000000..7e15fab0018
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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-oauth2-basic/config/settings.yml b/plugins/discourse-oauth2-basic/config/settings.yml
new file mode 100644
index 00000000000..0eeed3ec2a1
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/config/settings.yml
@@ -0,0 +1,55 @@
+login:
+ oauth2_enabled:
+ default: false
+ client: true
+ oauth2_client_id: ""
+ oauth2_client_secret:
+ default: ""
+ secret: true
+ oauth2_authorize_url: ""
+ oauth2_authorize_signup_url: ""
+ oauth2_token_url: ""
+ oauth2_token_url_method:
+ default: "POST"
+ type: enum
+ choices:
+ - GET
+ - POST
+ - PUT
+ oauth2_callback_user_id_path: ""
+ oauth2_callback_user_info_paths:
+ type: list
+ default: "id"
+ oauth2_fetch_user_details:
+ default: true
+ validator: "Oauth2FetchUserDetailsValidator"
+ oauth2_user_json_url: ""
+ oauth2_user_json_url_method:
+ default: "GET"
+ type: enum
+ choices:
+ - GET
+ - POST
+ oauth2_json_user_id_path: ""
+ oauth2_json_username_path: ""
+ oauth2_json_name_path: ""
+ oauth2_json_email_path: ""
+ oauth2_json_email_verified_path: ""
+ oauth2_json_avatar_path: ""
+ oauth2_email_verified: false
+ oauth2_overrides_email: false
+ oauth2_send_auth_header: true
+ oauth2_send_auth_body: true
+ oauth2_debug_auth: false
+ oauth2_authorize_options:
+ default: "scope"
+ type: list
+ oauth2_scope: ""
+ oauth2_button_title:
+ default: "with OAuth2"
+ client: true
+ oauth2_allow_association_change:
+ default: false
+ oauth2_disable_csrf:
+ default: false
+ hidden: true
diff --git a/plugins/discourse-oauth2-basic/db/migrate/20190724055909_move_to_managed_authenticator.rb b/plugins/discourse-oauth2-basic/db/migrate/20190724055909_move_to_managed_authenticator.rb
new file mode 100644
index 00000000000..6427ad7e0f7
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/db/migrate/20190724055909_move_to_managed_authenticator.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class MoveToManagedAuthenticator < ActiveRecord::Migration[5.2]
+ def up
+ execute <<~SQL
+ INSERT INTO user_associated_accounts (
+ provider_name,
+ provider_uid,
+ user_id,
+ created_at,
+ updated_at
+ ) SELECT
+ 'oauth2_basic',
+ replace(key, 'oauth2_basic_user_', ''),
+ (value::json->>'user_id')::integer,
+ CURRENT_TIMESTAMP,
+ CURRENT_TIMESTAMP
+ FROM plugin_store_rows
+ WHERE plugin_name = 'oauth2_basic'
+ AND value::json->>'user_id' ~ '^[0-9]+$'
+ ON CONFLICT (provider_name, user_id)
+ DO NOTHING
+ SQL
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/plugins/discourse-oauth2-basic/lib/oauth2_basic_authenticator.rb b/plugins/discourse-oauth2-basic/lib/oauth2_basic_authenticator.rb
new file mode 100644
index 00000000000..0b77defc105
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/lib/oauth2_basic_authenticator.rb
@@ -0,0 +1,261 @@
+# frozen_string_literal: true
+
+class OAuth2BasicAuthenticator < Auth::ManagedAuthenticator
+ def name
+ "oauth2_basic"
+ end
+
+ def can_revoke?
+ SiteSetting.oauth2_allow_association_change
+ end
+
+ def can_connect_existing_user?
+ SiteSetting.oauth2_allow_association_change
+ end
+
+ def register_middleware(omniauth)
+ omniauth.provider :oauth2_basic,
+ name: name,
+ setup:
+ lambda { |env|
+ opts = env["omniauth.strategy"].options
+ opts[:client_id] = SiteSetting.oauth2_client_id
+ opts[:client_secret] = SiteSetting.oauth2_client_secret
+ opts[:provider_ignores_state] = SiteSetting.oauth2_disable_csrf
+ opts[:client_options] = {
+ authorize_url: SiteSetting.oauth2_authorize_url,
+ token_url: SiteSetting.oauth2_token_url,
+ token_method: SiteSetting.oauth2_token_url_method.downcase.to_sym,
+ }
+ opts[:authorize_options] = SiteSetting
+ .oauth2_authorize_options
+ .split("|")
+ .map(&:to_sym)
+
+ if SiteSetting.oauth2_authorize_signup_url.present? &&
+ ActionDispatch::Request.new(env).params["signup"].present?
+ opts[:client_options][
+ :authorize_url
+ ] = SiteSetting.oauth2_authorize_signup_url
+ end
+
+ if SiteSetting.oauth2_send_auth_header? &&
+ SiteSetting.oauth2_send_auth_body?
+ # For maximum compatibility we include both header and body auth by default
+ # This is a little unusual, and utilising multiple authentication methods
+ # is technically disallowed by the spec (RFC2749 Section 5.2)
+ opts[:client_options][:auth_scheme] = :request_body
+ opts[:token_params] = {
+ headers: {
+ "Authorization" => basic_auth_header,
+ },
+ }
+ elsif SiteSetting.oauth2_send_auth_header?
+ opts[:client_options][:auth_scheme] = :basic_auth
+ else
+ opts[:client_options][:auth_scheme] = :request_body
+ end
+
+ if SiteSetting.oauth2_scope.present?
+ opts[:scope] = SiteSetting.oauth2_scope
+ end
+
+ opts[:client_options][:connection_build] = lambda do |builder|
+ if SiteSetting.oauth2_debug_auth && defined?(OAuth2FaradayFormatter)
+ builder.response :logger,
+ Rails.logger,
+ { bodies: true, formatter: OAuth2FaradayFormatter }
+ end
+
+ builder.request :url_encoded # form-encode POST params
+ builder.adapter FinalDestination::FaradayAdapter # make requests with FinalDestination::HTTP
+ end
+ }
+ end
+
+ def basic_auth_header
+ "Basic " +
+ Base64.strict_encode64("#{SiteSetting.oauth2_client_id}:#{SiteSetting.oauth2_client_secret}")
+ end
+
+ def walk_path(fragment, segments, seg_index = 0)
+ first_seg = segments[seg_index]
+ return if first_seg.blank? || fragment.blank?
+ return nil unless fragment.is_a?(Hash) || fragment.is_a?(Array)
+ first_seg = segments[seg_index].scan(/([\d+])/).length > 0 ? first_seg.split("[")[0] : first_seg
+ if fragment.is_a?(Hash)
+ deref = fragment[first_seg]
+ else
+ array_index = 0
+ if (seg_index > 0)
+ last_index = segments[seg_index - 1].scan(/([\d+])/).flatten() || [0]
+ array_index = last_index.length > 0 ? last_index[0].to_i : 0
+ end
+ if fragment.any? && fragment.length >= array_index - 1
+ deref = fragment[array_index][first_seg]
+ else
+ deref = nil
+ end
+ end
+
+ if deref.blank? || seg_index == segments.size - 1
+ deref
+ else
+ seg_index += 1
+ walk_path(deref, segments, seg_index)
+ end
+ end
+
+ def json_walk(result, user_json, prop, custom_path: nil)
+ path = custom_path || SiteSetting.public_send("oauth2_json_#{prop}_path")
+ if path.present?
+ #this.[].that is the same as this.that, allows for both this[0].that and this.[0].that path styles
+ path = path.gsub(".[].", ".").gsub(".[", "[")
+ segments = parse_segments(path)
+ val = walk_path(user_json, segments)
+ # [] should be nil, false should be false
+ result[prop] = val.presence || (val == [] ? nil : val)
+ end
+ end
+
+ def parse_segments(path)
+ segments = [+""]
+ quoted = false
+ escaped = false
+
+ path
+ .split("")
+ .each do |char|
+ next_char_escaped = false
+ if !escaped && (char == '"')
+ quoted = !quoted
+ elsif !escaped && !quoted && (char == ".")
+ segments.append +""
+ elsif !escaped && (char == '\\')
+ next_char_escaped = true
+ else
+ segments.last << char
+ end
+ escaped = next_char_escaped
+ end
+
+ segments
+ end
+
+ def log(info)
+ Rails.logger.warn("OAuth2 Debugging: #{info}") if SiteSetting.oauth2_debug_auth
+ end
+
+ def fetch_user_details(token, id)
+ user_json_url = SiteSetting.oauth2_user_json_url.sub(":token", token.to_s).sub(":id", id.to_s)
+ user_json_method = SiteSetting.oauth2_user_json_url_method.downcase.to_sym
+
+ bearer_token = "Bearer #{token}"
+ connection = Faraday.new { |f| f.adapter FinalDestination::FaradayAdapter }
+ headers = { "Authorization" => bearer_token, "Accept" => "application/json" }
+ user_json_response = connection.run_request(user_json_method, user_json_url, nil, headers)
+
+ log <<-LOG
+ user_json request: #{user_json_method} #{user_json_url}
+
+ request headers: #{headers}
+
+ response status: #{user_json_response.status}
+
+ response body:
+ #{user_json_response.body}
+ LOG
+
+ if user_json_response.status == 200
+ user_json = JSON.parse(user_json_response.body)
+
+ log("user_json:\n#{user_json.to_yaml}")
+
+ result = {}
+ if user_json.present?
+ json_walk(result, user_json, :user_id)
+ json_walk(result, user_json, :username)
+ json_walk(result, user_json, :name)
+ json_walk(result, user_json, :email)
+ json_walk(result, user_json, :email_verified)
+ json_walk(result, user_json, :avatar)
+
+ DiscoursePluginRegistry.oauth2_basic_additional_json_paths.each do |detail|
+ prop = "extra:#{detail}"
+ json_walk(result, user_json, prop, custom_path: detail)
+ end
+ end
+ result
+ else
+ nil
+ end
+ end
+
+ def primary_email_verified?(auth)
+ return true if SiteSetting.oauth2_email_verified
+ verified = auth["info"]["email_verified"]
+ verified = true if verified == "true"
+ verified = false if verified == "false"
+ verified
+ end
+
+ def always_update_user_email?
+ SiteSetting.oauth2_overrides_email
+ end
+
+ def after_authenticate(auth, existing_account: nil)
+ log <<-LOG
+ after_authenticate response:
+
+ creds:
+ #{auth["credentials"].to_hash.to_yaml}
+
+ uid: #{auth["uid"]}
+
+ info:
+ #{auth["info"].to_hash.to_yaml}
+
+ extra:
+ #{auth["extra"].to_hash.to_yaml}
+ LOG
+
+ if SiteSetting.oauth2_fetch_user_details? && SiteSetting.oauth2_user_json_url.present?
+ if fetched_user_details = fetch_user_details(auth["credentials"]["token"], auth["uid"])
+ auth["uid"] = fetched_user_details[:user_id] if fetched_user_details[:user_id]
+ auth["info"]["nickname"] = fetched_user_details[:username] if fetched_user_details[
+ :username
+ ]
+ auth["info"]["image"] = fetched_user_details[:avatar] if fetched_user_details[:avatar]
+ %w[name email email_verified].each do |property|
+ auth["info"][property] = fetched_user_details[property.to_sym] if fetched_user_details[
+ property.to_sym
+ ]
+ end
+
+ DiscoursePluginRegistry.oauth2_basic_additional_json_paths.each do |detail|
+ auth["extra"][detail] = fetched_user_details["extra:#{detail}"]
+ end
+
+ DiscoursePluginRegistry.oauth2_basic_required_json_paths.each do |x|
+ if fetched_user_details[x[:path]] != x[:required_value]
+ result = Auth::Result.new
+ result.failed = true
+ result.failed_reason = x[:error_message]
+ return result
+ end
+ end
+ else
+ result = Auth::Result.new
+ result.failed = true
+ result.failed_reason = I18n.t("login.authenticator_error_fetch_user_details")
+ return result
+ end
+ end
+
+ super(auth, existing_account: existing_account)
+ end
+
+ def enabled?
+ SiteSetting.oauth2_enabled
+ end
+end
diff --git a/plugins/discourse-oauth2-basic/lib/oauth2_faraday_formatter.rb b/plugins/discourse-oauth2-basic/lib/oauth2_faraday_formatter.rb
new file mode 100644
index 00000000000..f9be55a6225
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/lib/oauth2_faraday_formatter.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+
+require "faraday/logging/formatter"
+
+class OAuth2FaradayFormatter < Faraday::Logging::Formatter
+ def request(env)
+ warn <<~LOG
+ OAuth2 Debugging: request #{env.method.upcase} #{env.url}
+
+ Headers:
+ #{env.request_headers.to_yaml}
+
+ Body:
+ #{env[:body].to_yaml}
+ LOG
+ end
+
+ def response(env)
+ warn <<~LOG
+ OAuth2 Debugging: response status #{env.status}
+
+ From #{env.method.upcase} #{env.url}
+
+ Headers:
+ #{env.request_headers.to_yaml}
+
+ Body:
+ #{env[:body].to_yaml}
+ LOG
+ end
+end
diff --git a/plugins/discourse-oauth2-basic/lib/omniauth/strategies/oauth2_basic.rb b/plugins/discourse-oauth2-basic/lib/omniauth/strategies/oauth2_basic.rb
new file mode 100644
index 00000000000..d493c8a2fbd
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/lib/omniauth/strategies/oauth2_basic.rb
@@ -0,0 +1,37 @@
+# frozen_string_literal: true
+
+class OmniAuth::Strategies::Oauth2Basic < ::OmniAuth::Strategies::OAuth2
+ option :name, "oauth2_basic"
+
+ uid do
+ if path = SiteSetting.oauth2_callback_user_id_path.split(".")
+ recurse(access_token, [*path]) if path.present?
+ end
+ end
+
+ info do
+ if paths = SiteSetting.oauth2_callback_user_info_paths.split("|")
+ result = Hash.new
+ paths.each do |p|
+ segments = p.split(":")
+ if segments.length == 2
+ key = segments.first
+ path = [*segments.last.split(".")]
+ result[key] = recurse(access_token, path)
+ end
+ end
+ result
+ end
+ end
+
+ def callback_url
+ Discourse.base_url_no_prefix + script_name + callback_path
+ end
+
+ def recurse(obj, keys)
+ return nil if !obj
+ k = keys.shift
+ result = obj.respond_to?(k) ? obj.send(k) : obj[k]
+ keys.empty? ? result : recurse(result, keys)
+ end
+end
diff --git a/plugins/discourse-oauth2-basic/lib/validators/oauth2_basic/oauth2_fetch_user_details_validator.rb b/plugins/discourse-oauth2-basic/lib/validators/oauth2_basic/oauth2_fetch_user_details_validator.rb
new file mode 100644
index 00000000000..3e38f2ef2c2
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/lib/validators/oauth2_basic/oauth2_fetch_user_details_validator.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class Oauth2FetchUserDetailsValidator
+ def initialize(opts = {})
+ @opts = opts
+ end
+
+ def valid_value?(val)
+ return true if val == "t"
+ SiteSetting.oauth2_callback_user_id_path.length > 0
+ end
+
+ def error_message
+ I18n.t("site_settings.errors.oauth2_fetch_user_details")
+ end
+end
diff --git a/plugins/discourse-oauth2-basic/plugin.rb b/plugins/discourse-oauth2-basic/plugin.rb
new file mode 100644
index 00000000000..f67e7cfeab1
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/plugin.rb
@@ -0,0 +1,34 @@
+# frozen_string_literal: true
+
+# name: discourse-oauth2-basic
+# about: Allows users to login to your forum using a basic OAuth2 provider.
+# meta_topic_id: 33879
+# version: 0.3
+# authors: Robin Ward
+# url: https://github.com/discourse/discourse/tree/main/plugins/discourse-oauth2-basic
+
+enabled_site_setting :oauth2_enabled
+
+require_relative "lib/omniauth/strategies/oauth2_basic"
+require_relative "lib/oauth2_faraday_formatter"
+require_relative "lib/oauth2_basic_authenticator"
+
+# You should use this register if you want to add custom paths to traverse the user details JSON.
+# We'll store the value in the user associated account's extra attribute hash using the full path as the key.
+DiscoursePluginRegistry.define_filtered_register :oauth2_basic_additional_json_paths
+
+# After authentication, we'll use this to confirm that the registered json paths are fulfilled, or display an error.
+# This requires SiteSetting.oauth2_fetch_user_details? to be true, and can be used with
+# DiscoursePluginRegistry.oauth2_basic_additional_json_paths.
+#
+# Example usage:
+# DiscoursePluginRegistry.register_oauth2_basic_required_json_path({
+# path: "extra:data.is_allowed_user",
+# required_value: true,
+# error_message: I18n.t("auth.user_not_allowed")
+# }, self)
+DiscoursePluginRegistry.define_filtered_register :oauth2_basic_required_json_paths
+
+auth_provider title_setting: "oauth2_button_title", authenticator: OAuth2BasicAuthenticator.new
+
+require_relative "lib/validators/oauth2_basic/oauth2_fetch_user_details_validator"
diff --git a/plugins/discourse-oauth2-basic/spec/integration/overrides_email_spec.rb b/plugins/discourse-oauth2-basic/spec/integration/overrides_email_spec.rb
new file mode 100644
index 00000000000..fd7ea91c95e
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/spec/integration/overrides_email_spec.rb
@@ -0,0 +1,50 @@
+# frozen_string_literal: true
+
+require "rails_helper"
+
+describe "OAuth2 Overrides Email", type: :request do
+ fab!(:initial_email) { "[email protected]" }
+ fab!(:new_email) { "[email protected]" }
+ fab!(:user) { Fabricate(:user, email: initial_email) }
+ fab!(:uac) do
+ UserAssociatedAccount.create!(user: user, provider_name: "oauth2_basic", provider_uid: "12345")
+ end
+
+ before do
+ SiteSetting.oauth2_enabled = true
+ SiteSetting.oauth2_callback_user_id_path = "uid"
+ SiteSetting.oauth2_fetch_user_details = false
+ SiteSetting.oauth2_email_verified = true
+
+ OmniAuth.config.test_mode = true
+ OmniAuth.config.mock_auth[:oauth2_basic] = OmniAuth::AuthHash.new(
+ provider: "oauth2_basic",
+ uid: "12345",
+ info: OmniAuth::AuthHash::InfoHash.new(email: new_email),
+ extra: {
+ raw_info: OmniAuth::AuthHash.new(email_verified: true),
+ },
+ credentials: OmniAuth::AuthHash.new,
+ )
+ end
+
+ it "doesn't update email by default" do
+ expect(user.reload.email).to eq(initial_email)
+
+ get "/auth/oauth2_basic/callback"
+ expect(response.status).to eq(302)
+ expect(session[:current_user_id]).to eq(user.id)
+
+ expect(user.reload.email).to eq(initial_email)
+ end
+
+ it "updates user email if enabled" do
+ SiteSetting.oauth2_overrides_email = true
+
+ get "/auth/oauth2_basic/callback"
+ expect(response.status).to eq(302)
+ expect(session[:current_user_id]).to eq(user.id)
+
+ expect(user.reload.email).to eq(new_email)
+ end
+end
diff --git a/plugins/discourse-oauth2-basic/spec/plugin_spec.rb b/plugins/discourse-oauth2-basic/spec/plugin_spec.rb
new file mode 100644
index 00000000000..e99a39c112c
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/spec/plugin_spec.rb
@@ -0,0 +1,398 @@
+# frozen_string_literal: true
+
+require "rails_helper"
+
+describe OAuth2BasicAuthenticator do
+ describe "after_authenticate" do
+ before { SiteSetting.oauth2_user_json_url = "https://provider.com/user" }
+
+ let(:user) { Fabricate(:user) }
+ let(:authenticator) { OAuth2BasicAuthenticator.new }
+
+ let(:auth) do
+ OmniAuth::AuthHash.new(
+ "provider" => "oauth2_basic",
+ "credentials" => {
+ token: "token",
+ },
+ "uid" => "123456789",
+ "info" => {
+ id: "id",
+ },
+ "extra" => {
+ },
+ )
+ end
+
+ before(:each) { SiteSetting.oauth2_email_verified = true }
+
+ it "finds user by email" do
+ authenticator.expects(:fetch_user_details).returns(email: user.email)
+ result = authenticator.after_authenticate(auth)
+ expect(result.user).to eq(user)
+ end
+
+ it "validates user email if provider has verified" do
+ SiteSetting.oauth2_email_verified = false
+ authenticator.stubs(:fetch_user_details).returns(email: user.email, email_verified: true)
+ result = authenticator.after_authenticate(auth)
+ expect(result.email_valid).to eq(true)
+ end
+
+ it "doesn't validate user email if provider hasn't verified" do
+ SiteSetting.oauth2_email_verified = false
+ authenticator.stubs(:fetch_user_details).returns(email: user.email, email_verified: nil)
+ result = authenticator.after_authenticate(auth)
+ expect(result.email_valid).to eq(false)
+ end
+
+ it "doesn't affect the site setting" do
+ SiteSetting.oauth2_email_verified = true
+ authenticator.stubs(:fetch_user_details).returns(email: user.email, email_verified: false)
+ result = authenticator.after_authenticate(auth)
+ expect(result.email_valid).to eq(true)
+ end
+
+ it "handles true/false strings from identity provider" do
+ SiteSetting.oauth2_email_verified = false
+ authenticator.stubs(:fetch_user_details).returns(email: user.email, email_verified: "true")
+ result = authenticator.after_authenticate(auth)
+ expect(result.email_valid).to eq(true)
+
+ authenticator.stubs(:fetch_user_details).returns(email: user.email, email_verified: "false")
+ result = authenticator.after_authenticate(auth)
+ expect(result.email_valid).to eq(false)
+ end
+
+ describe "fetch_user_details" do
+ before(:each) do
+ SiteSetting.oauth2_fetch_user_details = true
+ SiteSetting.oauth2_user_json_url = "https://provider.com/user"
+ SiteSetting.oauth2_user_json_url_method = "GET"
+ SiteSetting.oauth2_json_email_path = "account.email"
+ end
+
+ let(:success_response) do
+ { status: 200, body: '{"account":{"email":"[email protected]"}}' }
+ end
+
+ let(:fail_response) { { status: 403 } }
+
+ it "works" do
+ stub_request(:get, SiteSetting.oauth2_user_json_url).to_return(success_response)
+ result = authenticator.after_authenticate(auth)
+ expect(result.email).to eq("[email protected]")
+
+ SiteSetting.oauth2_user_json_url_method = "POST"
+ stub_request(:post, SiteSetting.oauth2_user_json_url).to_return(success_response)
+ result = authenticator.after_authenticate(auth)
+ expect(result.email).to eq("[email protected]")
+ end
+
+ it "returns an standardised result if the http request fails" do
+ stub_request(:get, SiteSetting.oauth2_user_json_url).to_return(fail_response)
+ result = authenticator.after_authenticate(auth)
+ expect(result.failed).to eq(true)
+
+ SiteSetting.oauth2_user_json_url_method = "POST"
+ stub_request(:post, SiteSetting.oauth2_user_json_url).to_return(fail_response)
+ result = authenticator.after_authenticate(auth)
+ expect(result.failed).to eq(true)
+ end
+
+ describe "fetch custom attributes" do
+ after { DiscoursePluginRegistry.reset_register!(:oauth2_basic_additional_json_paths) }
+
+ let(:response) do
+ {
+ status: 200,
+ body: '{"account":{"email":"[email protected]","custom_attr":"received"}}',
+ }
+ end
+
+ it "stores custom attributes in the user associated account" do
+ custom_path = "account.custom_attr"
+ DiscoursePluginRegistry.register_oauth2_basic_additional_json_path(
+ custom_path,
+ Plugin::Instance.new,
+ )
+ stub_request(:get, SiteSetting.oauth2_user_json_url).to_return(response)
+
+ result = authenticator.after_authenticate(auth)
+ associated_account = UserAssociatedAccount.last
+
+ expect(associated_account.extra[custom_path]).to eq("received")
+ end
+ end
+
+ describe "required attributes" do
+ after { DiscoursePluginRegistry.reset_register!(:oauth2_basic_required_json_paths) }
+
+ it "'authenticates' successfully if required json path is fulfilled" do
+ DiscoursePluginRegistry.register_oauth2_basic_additional_json_path(
+ "account.is_legit",
+ Plugin::Instance.new,
+ )
+ DiscoursePluginRegistry.register_oauth2_basic_required_json_path(
+ { path: "extra:account.is_legit", required_value: true },
+ Plugin::Instance.new,
+ )
+
+ response = {
+ status: 200,
+ body: '{"account":{"email":"[email protected]","is_legit":true}}',
+ }
+ stub_request(:get, SiteSetting.oauth2_user_json_url).to_return(response)
+
+ result = authenticator.after_authenticate(auth)
+ expect(result.failed).to eq(false)
+ end
+
+ it "fails 'authentication' if required json path is unfulfilled" do
+ DiscoursePluginRegistry.register_oauth2_basic_additional_json_path(
+ "account.is_legit",
+ Plugin::Instance.new,
+ )
+ DiscoursePluginRegistry.register_oauth2_basic_required_json_path(
+ {
+ path: "extra:account.is_legit",
+ required_value: true,
+ error_message: "You're not legit",
+ },
+ Plugin::Instance.new,
+ )
+ response = {
+ status: 200,
+ body: '{"account":{"email":"[email protected]","is_legit":false}}',
+ }
+ stub_request(:get, SiteSetting.oauth2_user_json_url).to_return(response)
+
+ result = authenticator.after_authenticate(auth)
+ expect(result.failed).to eq(true)
+ expect(result.failed_reason).to eq("You're not legit")
+ end
+ end
+ end
+
+ describe "avatar downloading" do
+ before do
+ Jobs.run_later!
+ SiteSetting.oauth2_fetch_user_details = true
+ SiteSetting.oauth2_email_verified = true
+ end
+
+ let(:job_klass) { Jobs::DownloadAvatarFromUrl }
+
+ before do
+ png =
+ Base64.decode64(
+ "R0lGODlhAQABALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD//wBiZCH5BAEAAA8ALAAAAAABAAEAAAQC8EUAOw==",
+ )
+ stub_request(:get, "http://avatar.example.com/avatar.png").to_return(
+ body: png,
+ headers: {
+ "Content-Type" => "image/png",
+ },
+ )
+ end
+
+ it "enqueues a download_avatar_from_url job for existing user" do
+ authenticator.expects(:fetch_user_details).returns(
+ email: user.email,
+ avatar: "http://avatar.example.com/avatar.png",
+ )
+ expect { authenticator.after_authenticate(auth) }.to change { job_klass.jobs.count }.by(1)
+
+ job_args = job_klass.jobs.last["args"].first
+
+ expect(job_args["url"]).to eq("http://avatar.example.com/avatar.png")
+ expect(job_args["user_id"]).to eq(user.id)
+ expect(job_args["override_gravatar"]).to eq(false)
+ end
+
+ it "enqueues a download_avatar_from_url job for new user" do
+ authenticator.expects(:fetch_user_details).returns(
+ email: "[email protected]",
+ avatar: "http://avatar.example.com/avatar.png",
+ )
+
+ auth_result = nil
+ expect { auth_result = authenticator.after_authenticate(auth) }.not_to change {
+ job_klass.jobs.count
+ }
+
+ expect { authenticator.after_create_account(user, auth_result) }.to change {
+ job_klass.jobs.count
+ }.by(1)
+
+ job_args = job_klass.jobs.last["args"].first
+
+ expect(job_args["url"]).to eq("http://avatar.example.com/avatar.png")
+ expect(job_args["user_id"]).to eq(user.id)
+ expect(job_args["override_gravatar"]).to eq(false)
+ end
+ end
+ end
+
+ it "can walk json" do
+ authenticator = OAuth2BasicAuthenticator.new
+ json_string = '{"user":{"id":1234,"email":{"address":"[email protected]"}}}'
+ SiteSetting.oauth2_json_email_path = "user.email.address"
+ result = authenticator.json_walk({}, JSON.parse(json_string), :email)
+
+ expect(result).to eq "[email protected]"
+ end
+
+ it "allows keys containing dots, if wrapped in quotes" do
+ authenticator = OAuth2BasicAuthenticator.new
+ json_string = '{"www.example.com/uid": "myuid"}'
+ SiteSetting.oauth2_json_user_id_path = '"www.example.com/uid"'
+ result = authenticator.json_walk({}, JSON.parse(json_string), :user_id)
+
+ expect(result).to eq "myuid"
+ end
+
+ it "allows keys containing dots, if escaped" do
+ authenticator = OAuth2BasicAuthenticator.new
+ json_string = '{"www.example.com/uid": "myuid"}'
+ SiteSetting.oauth2_json_user_id_path = 'www\.example\.com/uid'
+ result = authenticator.json_walk({}, JSON.parse(json_string), :user_id)
+
+ expect(result).to eq "myuid"
+ end
+
+ it "allows keys containing literal backslashes, if escaped" do
+ authenticator = OAuth2BasicAuthenticator.new
+ # This 'single quoted heredoc' syntax means we don't have to escape backslashes in Ruby
+ # What you see is exactly what the user would enter in the site settings
+ json_string = <<~'_'.chomp
+ {"www.example.com/uid\\": "myuid"}
+ _
+ SiteSetting.oauth2_json_user_id_path = <<~'_'.chomp
+ www\.example\.com/uid\\
+ _
+ result = authenticator.json_walk({}, JSON.parse(json_string), :user_id)
+ expect(result).to eq "myuid"
+ end
+
+ it "can walk json that contains an array" do
+ authenticator = OAuth2BasicAuthenticator.new
+ json_string =
+ '{"email":"[email protected]","identities":[{"user_id":"123456789","provider":"auth0","isSocial":false}]}'
+ SiteSetting.oauth2_json_user_id_path = "identities.[].user_id"
+ result = authenticator.json_walk({}, JSON.parse(json_string), :user_id)
+
+ expect(result).to eq "123456789"
+ end
+
+ it "can walk json and handle an empty array" do
+ authenticator = OAuth2BasicAuthenticator.new
+ json_string = '{"email":"[email protected]","identities":[]}'
+ SiteSetting.oauth2_json_user_id_path = "identities.[].user_id"
+ result = authenticator.json_walk({}, JSON.parse(json_string), :user_id)
+
+ expect(result).to eq nil
+ end
+
+ it "can walk json and find values by index in an array" do
+ authenticator = OAuth2BasicAuthenticator.new
+ json_string = '{"emails":[{"value":"[email protected]"},{"value":"[email protected]"}]}'
+ SiteSetting.oauth2_json_email_path = "emails[1].value"
+ result = authenticator.json_walk({}, JSON.parse(json_string), :email)
+
+ expect(result).to eq "[email protected]"
+ end
+
+ it "can walk json and download avatar" do
+ authenticator = OAuth2BasicAuthenticator.new
+ json_string = '{"user":{"avatar":"http://example.com/1.png"}}'
+ SiteSetting.oauth2_json_avatar_path = "user.avatar"
+ result = authenticator.json_walk({}, JSON.parse(json_string), :avatar)
+
+ expect(result).to eq "http://example.com/1.png"
+ end
+
+ it "can walk json and appropriately assign a `false`" do
+ authenticator = OAuth2BasicAuthenticator.new
+ json_string = '{"user":{"id":1234, "data": {"address":"[email protected]", "is_cat": false}}}'
+ SiteSetting.oauth2_json_email_verified_path = "user.data.is_cat"
+ result =
+ authenticator.json_walk(
+ {},
+ JSON.parse(json_string),
+ "extra:user.data.is_cat",
+ custom_path: "user.data.is_cat",
+ )
+
+ expect(result).to eq false
+ end
+
+ describe "token_callback" do
+ let(:user) { Fabricate(:user) }
+ let(:strategy) { OmniAuth::Strategies::Oauth2Basic.new({}) }
+ let(:authenticator) { OAuth2BasicAuthenticator.new }
+
+ let(:auth) do
+ OmniAuth::AuthHash.new(
+ "provider" => "oauth2_basic",
+ "credentials" => {
+ "token" => "token",
+ },
+ "uid" => "e028b1b918853eca7fba208a9d7e9d29a6e93c57",
+ "info" => {
+ "name" => "Sammy the Shark",
+ "email" => "[email protected]",
+ },
+ "extra" => {
+ },
+ )
+ end
+
+ let(:access_token) do
+ {
+ "params" => {
+ "info" => {
+ "name" => "Sammy the Shark",
+ "email" => "[email protected]",
+ "uuid" => "e028b1b918853eca7fba208a9d7e9d29a6e93c57",
+ },
+ },
+ }
+ end
+
+ before(:each) do
+ SiteSetting.oauth2_callback_user_id_path = "params.info.uuid"
+ SiteSetting.oauth2_callback_user_info_paths = "name:params.info.name|email:params.info.email"
+ end
+
+ it "can retrieve user id from access token callback" do
+ strategy.stubs(:access_token).returns(access_token)
+ expect(strategy.uid).to eq "e028b1b918853eca7fba208a9d7e9d29a6e93c57"
+ end
+
+ it "can retrieve user properties from access token callback" do
+ strategy.stubs(:access_token).returns(access_token)
+ expect(strategy.info["name"]).to eq "Sammy the Shark"
+ expect(strategy.info["email"]).to eq "[email protected]"
+ end
+
+ it "does apply user properties from access token callback in after_authenticate" do
+ SiteSetting.oauth2_fetch_user_details = true
+ authenticator.stubs(:fetch_user_details).returns(email: "[email protected]")
+ result = authenticator.after_authenticate(auth)
+
+ expect(result.extra_data[:uid]).to eq "e028b1b918853eca7fba208a9d7e9d29a6e93c57"
+ expect(result.name).to eq "Sammy the Shark"
+ expect(result.email).to eq "[email protected]"
+ end
+
+ it "does work if user details are not fetched" do
+ SiteSetting.oauth2_fetch_user_details = false
+ result = authenticator.after_authenticate(auth)
+
+ expect(result.extra_data[:uid]).to eq "e028b1b918853eca7fba208a9d7e9d29a6e93c57"
+ expect(result.name).to eq "Sammy the Shark"
+ expect(result.email).to eq "[email protected]"
+ end
+ end
+end
diff --git a/plugins/discourse-oauth2-basic/spec/system/core_features_spec.rb b/plugins/discourse-oauth2-basic/spec/system/core_features_spec.rb
new file mode 100644
index 00000000000..db86db283bd
--- /dev/null
+++ b/plugins/discourse-oauth2-basic/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"
+end
diff --git a/translator.yml b/translator.yml
index 225455722be..5a670f699b9 100644
--- a/translator.yml
+++ b/translator.yml
@@ -143,3 +143,10 @@ files:
- source_path: plugins/discourse-microsoft-auth/config/locales/server.en.yml
destination_path: plugins/microsoft-auth/server.yml
label: microsoft-auth
+
+ - source_path: plugins/discourse-oauth2-basic/config/locales/client.en.yml
+ destination_path: plugins/oauth2-basic/client.yml
+ label: oauth2-basic
+ - source_path: plugins/discourse-oauth2-basic/config/locales/server.en.yml
+ destination_path: plugins/oauth2-basic/server.yml
+ label: oauth2-basic