npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ida-client-demo

v1.0.2

Published

Demo application for IDA Client Service

Readme

IDA Client Demo Application

This is a demo Express.js application that demonstrates how to use the IDA Client Service library.

Setup

  1. Install dependencies:

    npm install
  2. Create a .env file: Copy the example below and create a .env file in the demo directory with your configuration:

    # IDA Client Service Configuration
    
    # Application Settings
    SPRING_APPLICATION_NAME=ida
    SERVER_PORT=8088
    DEBUG=false
    IDA_ENCODING_URLSAFE=true
    
    # Fayda Partner Configuration
    FAYDA_PARTNER_ID=mpartner-tech5-lora
    FAYDA_BASE_URL=https://api-internal.oracle1.fayda.et
    FAYDA_ENV=Staging
    
    # Authentication Credentials
    CLIENT_ID=mosip-regproc-client
    SECRET_KEY=hY98OcJIkskFb2yD
    APP_ID=regproc
    IDA_REFERENCE_ID=PARTNER
    MISP_LICENSE_KEY=jq8Ta9gRaETEpbBiaOipDDylI0rA5JfhAfirZxFANw2Wj4cQ6n
    PARTNER_ID=mpartner-tech5-lora
    PARTNER_API_KEY=630756
    
    # Certificate and Key Paths
    # Note: Use forward slashes or escaped backslashes for Windows paths
    PARTNER_P12_CERTIFICATE=C:\\Users\\amanu\\Documents\\nidp\\ida-client-service\\keys\\mpartner-tech5-lora-partner.p12
    PARTNER_P12_CERTIFICATE_KEY_ALIAS=keyAlias
    PARTNER_P12_CERTIFICATE_KEY_PASSWORD=qwerty@123
    PARTNER_PUBLIC_KEY_CERTIFICATE=C:\\Users\\amanu\\Documents\\nidp\\ida-client-service\\keys\\mpartner-tech5-lora-partner.cer
    
    # P12 Configuration
    P12_PASSWORD=qwerty@123
    P12_PATH=C:\\Users\\amanu\\Documents\\nidp\\ida-client-service\\keys
    
    # API URLs (with placeholders that will be resolved automatically)
    IDA_OTP_URL=${FAYDA_BASE_URL}/idauthentication/v1/otp/${MISP_LICENSE_KEY}/${PARTNER_ID}/${PARTNER_API_KEY}
    IDA_AUTH_URL=${FAYDA_BASE_URL}/idauthentication/v1/auth/${MISP_LICENSE_KEY}/${PARTNER_ID}/${PARTNER_API_KEY}
    IDA_EKYC_URL=${FAYDA_BASE_URL}/idauthentication/v1/kyc/${MISP_LICENSE_KEY}/${PARTNER_ID}/${PARTNER_API_KEY}
    IDA_CERTIFICATE_URL=${FAYDA_BASE_URL}/idauthentication/v1/internal/getCertificate
    IDA_AUTHMANAGER_URL=${FAYDA_BASE_URL}/v1/authmanager/authenticate/clientidsecretkey
    IDA_INTERNAL_JWT_SIGN_URL=${FAYDA_BASE_URL}/idauthentication/v1/internal/jwtSign
    
    # SSL Configuration
    IDA_SSL_VERIFY=false

    Note: The configuration loader supports both formats:

    • Uppercase with underscores: FAYDA_BASE_URL
    • Original format: fayda.base.url
    • Placeholders in URLs (e.g., ${FAYDA_BASE_URL}) are automatically resolved
  3. Build the project:

    npm run build
  4. Start the server:

    npm start

    The server will start on port 8088 (or the port specified in your .env file).

API Endpoints

Request OTP

POST http://localhost:8088/otp/:individualId

Example:

curl -X POST http://localhost:8088/otp/1234567890

Note: The demo uses FAN as the ID type, which is automatically converted to VID by the SDK.

Authenticate

POST http://localhost:8088/auth/:individualId/:otp

Example:

curl -X POST http://localhost:8088/auth/1234567890/111111

Note: The demo uses FAN as the ID type, which is automatically converted to VID by the SDK.

eKYC

POST http://localhost:8088/ekyc/:individualId/:otp

Example:

curl -X POST http://localhost:8088/ekyc/1234567890/111111

Note: The demo uses FIN as the ID type, which is automatically converted to UIN by the SDK.

ID Type Mapping

The SDK automatically maps client-friendly ID types:

  • FAN → VID (Virtual ID)
  • FIN → UIN (Unique Identification Number)
  • VID and UIN are passed through as-is

This mapping is case-insensitive and happens automatically.

Configuration

The demo application loads configuration from a .env file using the dotenv package. All configuration values are loaded as environment variables and then mapped to the IDA Client configuration format.

Environment Variable Format

You can use either format in your .env file:

  1. Uppercase with underscores (recommended):

    FAYDA_BASE_URL=https://api-internal.oracle1.fayda.et
    CLIENT_ID=mosip-regproc-client
  2. Original property format:

    fayda.base.url=https://api-internal.oracle1.fayda.et
    clientId=mosip-regproc-client

Placeholder Resolution

URLs can use placeholders that reference other environment variables:

FAYDA_BASE_URL=https://api-internal.oracle1.fayda.et
IDA_OTP_URL=${FAYDA_BASE_URL}/idauthentication/v1/otp/${MISP_LICENSE_KEY}/${PARTNER_ID}/${PARTNER_API_KEY}

The placeholders will be automatically resolved when the configuration is loaded.

Development

To run in development mode with auto-reload:

npm run dev

Note: This requires ts-node to be installed.