> For the complete documentation index, see [llms.txt](https://docs.esignet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.esignet.io/build-and-deploy/local-deployment/mock-client-application.md).

# Mock Relying Party

This guide helps in setting up the mock OIDC-relying party portal. This portal uses the authorization code flow with private key JWT client authentication to fetch the user profile.

The mock relying party portal is built with reactJS. This consists of the below two components:

1. mock-relying-party-ui
2. mock-relying-party-service

## Mock relying party UI

UI component consists of the login page and a user profile page.

The login webpage is built with the `Log in with eSignet` button. With the click of this button, the user is redirected to the authorization endpoint of the eSignet UI.

The user profile "***/userprofile***" webpage is crafted to which the eSignet server redirects after successful authentication with "***auth-code***".

On a load of the user profile webpage, the "***/fetchUserInfo***" endpoint of the mock-relying-party service is invoked with a valid auth code.

## Mock relying party service

This service only hosts the "***/fetchUserInfo***" endpoint.

The "***/fetchUserInfo***" endpoint will invoke the "***/token***" endpoint of the eSignet server with client\_private\_jwt auth.

On receiving the id-token and access-token from the "***/token***" endpoint, the mock-relying-party-service invokes the "***/userinfo***" endpoint of the eSignet server to fetch user details. Decoded user info is returned as the response to the "***/fetchUserInfo***" endpoint.

## How to build and run the mock relying party portal locally?

To build and run the mock relying party portal please refer to the below README.md file

{% embed url="<https://github.com/mosip/esignet-mock-services/blob/master/docker-compose/README.md>" %}


---

# 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.esignet.io/build-and-deploy/local-deployment/mock-client-application.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.
