rubydoob
(Salman)
22 يناير 2020، 2:33م
1
هناك حلول مستضافة تتيح التكامل مع نظام Discourse.
هل توجد أي أمثلة على أكواد برمجية توضح ما يجب أن تقوم به الحلول المستضافة للتكامل مع نظام تسجيل الدخول في Discourse؟
على سبيل المثال، يوفر Patreon إضافة تتيح لمستخدمي Patreon تسجيل الدخول إلى Discourse. أنا أبحث عن أمثلة على أكواد برمجية توضح ما يجب أن تقوم به حلول مستضافة مثل Patreon من جانبها لتمكين هذا النوع من التكامل.
قد يكون مصطلحي غير دقيق، ولكن هل يُعتبر Patreon في هذه الحالة مزوّدًا لتسجيل الدخول الموحد (SSO)؟
شكرًا لك!
Falco
(Falco)
23 يناير 2020، 3:34ص
7
لدينا عدد لا بأس به من الأمثلة حول ذلك:
If you are using Nginx (or the awesome OpenResty) to handle you user authentication, you can handle the Discourse SSO on the Nginx too!
This assumes you are using the ideas on this article to handle authentication:
The following code implements the Discourse SSO protocol in Lua, and even sets custom fields and the user birthday date for the cakeday plugin :
-- First we inline this PR https://github.com/openresty/lua-resty-string/pull/18
-- You can remove this after @agentzh merges this patch…
I felt like making something the other night, so I implemented an DiscourseConnect provider that is useful for development and testing:
https://github.com/Supermathie/bratwurst
The utility of this is to be able to configure an SSO backend so that you can test out the behaviour of Discourse with different scenarios from an external provider (e.g. “What happens if two users have the same email but different external IDs? What happens if the external ID changes? What happens if two users have the…
https://github.com/topics/discourse-sso
إذا كان موقعك الإلكتروني يستخدم Ruby و Rails، فيمكنك نسخ ولصق الملف https://github.com/discourse/discourse/blob/master/lib/single_sign_on.rb في مجلد lib الخاص بك للقيام بكل العمل الشاق، ثم إضافة المتحكم (controller) والمسار (route) الضروريين.