Inji Web is built using tailwind CSS library.
Below sections provides instructions on how themes can be customized in Inji Web application.
InjiWeb uses two different files to handle the customization in UI.
1. tailwind.config.js:
Here, properties related to the font and colors for each component is maintained.
2. index.css
DEFAULT_THEME: This property helps you to customize the theme, currently Inji Web Supports two different Themes
DEFAULT_LANG: - This property helps you to specify the default language during the deployment.
DEFAULT_TITLE: - This property helps you to specify the default title of the INJIWEB during the deployment.
Inji Web offers multi-lingual support. At present, 3 Indian and 3 international Languages are supported.
English
Arabic
French
Tamil
Hindi
Kannada
Under locales
folder, localization of a particular language JSON file has to be added.
Language JSON has to be imported in i18n.ts
and load the resources to i18next as follows:
import ta from './locales/ta.json';
const resources = { en, fr, ar, hi, kn, ta };
Ensure the language display mapping is done in the LanguagesSupported variable in i18n.ts
To use with react, must include the key with the 't' function <Text>{t('editLabel')}</Text>
Below specified libraries are used in the Inji Web react project to support localization:
i18next: i18next
is an internationalization framework. It provides the standard i18n features such as plurals, context, interpolation, and format. It provides a complete solution to localize products in the web.
react-i18next: react-i18next
is a set of components, hooks, and plugins that sit on top of i18next, and is specifically designed for React.
Inji Web currently provides support for following credential providers:
Download VC using OpenID for VC Issuance Flow (eSignet)
National ID
Insurance
To set up a new provider that can issue VC, it can be accomplished by making a few configuration changes.
Steps:
The configuration details can be found in the mimoto-issuers-config.json
property file. This file is maintained separately for each deployment environment. In this repository, each environment's configuration is stored in a dedicated branch specific to that environment.
Refer to of Collab environment.
These values will be used by Inji Wallet via Mimoto. Mimoto exposes APIs which is used by the Inji Wallet application to fetch, store the issuers and their configurations in the local storage.
API used to fetch issuers: https://api.mosip.io/v1/mimoto/residentmobileapp/issuers
API used to fetch issuer's configuration: https://api.mosip.io/v1/mimoto/residentmobileapp/issuers/${issuerId}
In mimoto-issuers-config.json
, new providers can be added as per the well-known
schema defined by OpenID4VCI standards.
After adding the provider in configuration, it will be displayed on the UI on Add new card
screen.
If new provider supports protocol, it is recommended to use issuerMachine.ts
and EsignetMosipVCItemMachine.ts
for workflow to download VC.
If it doesn't support OpenID4VCI
protocol, new state machine needs to be added. Please refer to issuerMachine.ts
and EsignetMosipVCItemMachine.ts
.
At present, Inji Wallet supports verification of VCs which has RSA proof type. If VC is issued with any other proof type, verification will fail and VC will not be downloaded. To bypass this VC verification, we need to use issuer id as "Sunbird".
Refer https://github.com/mosip/mosip-config/blob/collab1/mimoto-issuers-config.json#L71 as reference. Here, credential_issuer should be "Sunbird" and then add all the configuration.
Token endpoint should also use same issuer id. Refer https://github.com/mosip/mosip-config/blob/collab1/mimoto-issuers-config.json#L143
Onboarding Mimoto as OIDC Client for a new Issuer:
Mimoto OIDC client is now added as an optional partner, which can be onboarded through partner onboarder as per requirement.
Client ID is created randomly by using the PMS API, and there is no client Secret for that.
Clients can be renewed upon request, however, this will require some manual adjustments. It is recommended to create a client only once per environment as they do not expire.
Modifications were made to the install.sh
script within the Mimoto software, along with adjustments to the helm charts in the Mimoto repository, in order to facilitate the storage and mounting of the oidckeystore.p12
file.
For Onboarding the new issuer, the same steps have to be followed and p12 has to be generated.
Once the p12 file is generated, the existing keystore file should be exported from the Mimoto pod. The newly created p12 file must then be imported and remounted in the Mimoto POD.
Countries have the option to customize Inji Web as per their requirements. Refer to the documents below for more information on the same.
The following customizations are available in Inji Web:
In itself, there is a script by the name create-signing-certs.sh
which creates the certificates as well as the oidckeystore.p12
.