> For the complete documentation index, see [llms.txt](https://docs.payswap.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payswap.org/alarbyh/use-cases/ssi/single-sign-on.md).

# علامة واحدة على

تسجيل الدخول بمرة واحدة (SSO) هو طريقة للمصادقة تمكن المستخدمين من تسجيل الدخول بأمان إلى عدة تطبيقات ومواقع عبر استخدام مجموعة واحدة من بيانات الاعتماد.

## كيف يعمل ذلك؟

تطلب من المستخدمين إنشاء معرفات SSID الخاصة بهم بالإضافة إلى رموز الهوية من تلك المعرفات. لتسجيل الدخول إلى خدمتك، سيحتاجون فقط إلى إدخال معرفات الهوية.

في الخلفية، تتحقق من أن رموز الهوية (التي هي NFTs) تنتمي حقًا إلى المستخدمين وإذا كانت كذلك، تحصل على SSID من رمز الهوية.

للحصول على SSID من رمز الهوية، ستحتاج إلى استعلام دالة **metadata** في عقد SSI وتمرير معرف رمز الهوية

```solidity
// مثال على الكود
ISSI(ssiContract).metadata(identity_token_id)
```

سيعيد هذا كائن البيانات مع التنسيق التالي

```solidity
struct SSIData {
    uint senderProfileId;
    uint receiverProfileId;
    uint auditorProfileId;
    uint deadline;
    string question;
    string answer;
    ProofType proofType;
}
```

للحصول على الSSID الفعلي، ستحصل على متغير الإجابة بعد التحقق من أن السؤال هو حقًا SSID

```solidity
// الكود الكامل
function getSSID(uint _identity_token_id) external returns(string memory) {
    SSIData memory data = ISSI(ssiContract).metadata(identity_token_id)
    require(keccak256(abi.encodePacked(data.question)) == keccak256(abi.encodePacked("ssid")))
    return data.answer
}
```

ستستخدم بيانات SSID للمستخدمين التي تم جمعها من رموز هويتهم كمعرفات لهم وتسجيلهم بعد أداء ذلك الفحص السريع


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payswap.org/alarbyh/use-cases/ssi/single-sign-on.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
