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 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?

Please consult the accompanying Readme files in their respective repositories for instructions on how to build and run the mock relying party portal.

Last updated

Copyright © 2021 MOSIP. This work is licensed under a Creative Commons Attribution (CC-BY-4.0) International License unless otherwise noted.