# Use Case

{% hint style="info" %}
This section is used to demonstrate several usage scenarios of zkID Login. You can follow the [**zkID Login Website**](https://login.zkid.app) for a further understanding. Each use case matches with a scenario in the website guide.
{% endhint %}

## Login with DID

As we mentioned before, DID could represent an entity. A Decentralised Identifier (DID) is a string uniquely identifying each user. Apart from the DID, the owner of DID should also own [DID-Keys](broken://pages/bCaIGQC43koAplCeKqDk#did-keys-currently-use), which contains different keys for multiple usage. Do not ignore DID-Keys, it plays a very important role here.

In the DID Login Process, the developer would ask the User to sign on a specific data and thus receives a Signature. By verifying the Signature's validity, the developer could authenticate the User's identity.

<figure><img src="https://i.imgur.com/rPM2uWf.jpg" alt=""><figcaption><p>DID Login</p></figcaption></figure>

## Login with Digest Disclosure

zkID Login provides a brand new way for Service Providers who need to verify users identity. With the advent of the web3.0 era, users are more and more aware of protecting their private data, and they are more inclined to keep their data in their own hands rather than hand it over to a third party.

All the service provider needs to do is to set the identity restriction of their target users. Here is a simply example (You could check more details about the example is our [zkID Login Website](https://login.zkid.app):

> `mockDao` only allow their employees to login its official website. Each employee obtains a `mockDao Membership Credential` on the first day of their work, which is attested and issued by `mockDao`. The credential contains each worker's *Name, Birthday, Membership Level*, as the Credential Example shows below.

![Credential Example](https://i.imgur.com/FSP62V3.jpg)

> Assuming that, Alice imports this verifiable credential to zkID Wallet and tries to login mockDao's official website. All Alice needs to do is to prove that she owns a `mockDao Membership Credential` attested by `mockDao` using zkID Wallet. The Method to be used, which best fits this situation, should be [**Digest Disclosure**](/readme/usage_of_vc.md#digest-disclosure) of a credential.(Because, what matters here is the existence of such a Membership Credential, [**Click Here**](/readme/usage_of_vc.md) to learn more about three types of Disclosure)
>
> So, all the things that `mockDao` needs to do is using the API offered by zkID Login to request a **Digest Disclosure** (in the case above) and can then easily determine whether the user is allowed to login.

## Login with Selective Disclosure

zkID Wallet enables users to manage the usage of VCs more granular. They can make fine-grained decisions about what information to share in a credential, without handing over the whole credential.

> For example, a `mockDao Membership Credential` contains *Name, Birthday, Membership Level*. In the Voting Process, the `Voting Website` only allows those whose `Membership Level > 2` to vote on some proposals. In this scenario, `Voting Website` only care about this property, it definitely could use zkID Login [**Selective Disclosure**](/readme/usage_of_vc.md#selective-disclosure) to accomplish that. Via zkID Login, the `Voting Website` **won't have access to any other information** of Alice expect her `Membership Level`, which protect Alice's privacy to the greatest extent.

To explore how zkID Login works, start with the [Basic Concept](/readme/did.md) which illustrates several key components in zkID Login.

Read [API Reference](/api.md) to get more specific details about how to interact with zkID Login system.


---

# Agent Instructions: 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:

```
GET https://docs.zkid.app/preliminary_preparation/use_case.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
