Single Sign-On Configuration
بوابة دخول واحدة لجميع تطبيقاتك — قلّل من إرهاق كلمات المرور ووفّر سياسات وصول مركزية.
SSO يسمح للمستخدمين بتسجيل الدخول مرة واحدة والوصول إلى عدة تطبيقات دون إعادة إدخال كلمات المرور. ميثاق يدعم SSO عبر:
البروتوكول المفضل للتطبيقات الحديثة — خفيف ومبني على JSON
للبيئات المؤسسية — SAP, Salesforce, Microsoft stack
للمصادقة من Active Directory — داخل المؤسسة
للمصادقة بدون كلمة مرور — أكثر أماناً
Realm هي وحدة العزل — كل organization أو فريق يجب أن يكون له realm خاص به.
acme-corp)ACME Corporation)| الإعداد | الغرض |
|---|---|
| Registration | تفعيل/إلغاء تسجيل المستخدمين الجدد |
| Login with Email | السماح بتسجيل الدخول بالبريد بدلاً من username |
| Forgot Password | تفعيل رابط استعادة كلمة المرور |
| Remember Me | تمديد Session duration تلقائياً |
| Edit Username | السماح للمستخدمين بتغيير usernames |
| Offline Access | تفعيل refresh tokens |
my-web-appopenid-connectpublic (SPA) أو confidential (backend)https://myapp.com/*https://myapp.comClient Secretsamlhttps://sf.company.com# Default Client Scopes (applied to all clients)
- openid
- profile
- email
- roles (custom scope for role claims)
# Add custom client scope
# Admin Console → Client Scopes → Create
# Name: custom-claims
# Protocol: openid-connect
# Add protocol mapper: realm roles → maps roles to token# Realm Settings → Tokens
Access Token Lifespan: 5 minutes
Access Token Lifespan For Implicit Flow: 15 minutes
Refresh Token Lifespan: 15 minutes (وقت inactivity)
SSO Session Idle Timeout: 30 minutes (تلقائي)
SSO Session Max Lifespan: 8 hours (القيمة القصوى)يمكنك تحديد عدد الجلسات المتزامنة لكل مستخدم لكل تطبيق:
# Clients → [client] → Sessions
Max Sessions: 100 (القيمة القصوى)# Admin Console: Users → [user] → Sessions
# Shows all active sessions, device info, and IP addressesيسجل الخروج من جميع التطبيقات مرة واحدة:
# Logout endpoint
GET /realms/{realm}/protocol/openid-connect/logout
?id_token_hint=ID_TOKEN_HERE
&post_logout_redirect_uri=https://app.com/logged-out
&state=STATESPAs can register a front-channel logout URI:
# Clients → [client] → Front-channel logout URL
# Methaq sends GET to this URL when user logs out
Front-channel logout URL: https://myapp.com/logoutFor confidential clients — server-to-server notification:
# Clients → [client] → Backchannel Logout URL
Backchannel logout URL: https://myapp.com/bc-logout
Backchannel Logout Session Required: ONيمكنك ربط ميثاق بمزود هوية خارجي — LDAP, Azure AD, Google, GitHub, SAML IdP:
import (ميثاق is source of truth) أو override (IdP is source)# Identity Provider → LDAP
Vendor: Active Directory
Connection URL: ldap://ldap.company.com:389
Bind DN: CN=admin,OU=Users,DC=company,DC=com
Bind Credential: **********
User Account LDAP Attributemapping:
LDAP Attribute → Methaq Attribute
sAMAccountName → username
mail → email
displayName → displayName
memberOf → groups