Inji
GitHubCommunityWhat's New
  • Inji
    • Try It Out
      • Using Mock Data
    • Use case
    • Resources
    • Roadmap
      • Roadmap 2025
      • Roadmap 2024
    • Supported Integrations
      • MOSIP
    • Project Governance
    • Contribution
      • Code Contribution
      • Code of Conduct
    • GenderMag
    • License
    • Setup
      • Infrastructure Requirements
      • Deploy
  • Inji Wallet
    • Inji Mobile
      • Overview
        • Features
      • Develop
        • Architecture
        • Technical Stack
        • Components
        • Integration Guides
          • Face Match
          • Secure Keystore
          • Tuvali
            • Permissions & Requirements
            • Tuvali API Documentation
          • BLE Verifier
          • PixelPass
          • Telemetry
          • VCI-Client
          • OpenID4VP
        • Specifications
          • Face SDK Specifications
        • Backend Services
          • Mimoto
          • eSignet
          • Inji Certify
        • Customizations
          • Workflow customization
          • UI customization
          • Locale customization
          • Configuration
          • Credential Providers
      • Test
        • Try It Out
          • Inji Mobile - Collab Guide
        • Workflow
        • End User Guide
      • Setup
        • Local Setup
      • Releases
        • Version 0.17.1
          • Test Report
        • Version 0.16.0
          • Test Report
        • Version 0.15.1
          • Test Report
        • Version 0.15.0
          • Test Report
        • Version 0.14.1
          • Test Report
        • Version 0.14.0
          • Test Report
        • Version 0.13.1
          • Test Report
        • Version 0.13.0
          • Test Report
        • Version 0.12.0
          • Test Report
        • Version 0.11.0-Inji
          • Test Report
        • Version 0.11.0
        • Version DP2
          • Test Report
        • Version 0.10.0
          • Test Report
        • Version DP1
        • Version 0.9.1
          • Test Report
        • Version 0.9.0
          • Test Report
    • Inji Web
      • Overview
        • Features
      • Develop
        • Architecture
        • Technology Stack
        • Backend services
          • Mimoto - BFF
          • eSignet - Authentication Layer
          • Configurations
        • Customizations
          • UI Customizations
          • Locale Customizations
          • Credential Providers
          • Customize VC PDF Template
        • Supported Browsers
      • Test
        • Try It Out
          • Inji Web - Collab Guide
        • Workflow
        • End User Guide
      • Setup
        • Local setup
      • Releases
        • Version 0.12.0
          • Test Report
        • Version v0.11.1
          • Test Report
        • Version 0.11.0
          • Test Report
        • Version 0.10.0
          • Test Report
        • Version 0.9.0
          • Test Report
        • Version 0.8.1
        • Version 0.8.0
          • Test Report
  • INJI CERTIFY
    • Overview
      • Features
    • Develop
      • Technology Stack
      • Components
      • Tested Operating Systems
    • Test
      • Functional Overview
      • Workflow
    • Setup
      • Local Setup
    • Releases
      • Version 0.11.0
        • Test Report
      • Version 0.10.2
        • Test Report
      • Version 0.10.1
        • Test Report
      • Version 0.9.1
        • Test Report
      • Version 0.9.0
        • Test Report
      • Version 0.8.1
      • Version 0.8.0
    • FAQ
      • FAQ
  • INJI VERIFY
    • Overview
      • Features
    • Develop
      • Technology Stack
      • Components
      • Supported Browsers
      • Customization
        • UI Customizations
        • Locale Customizations
      • Integration Guides
        • OpenID4VP-VP Verification Integration Guide
    • Test
      • Try It Out
        • Inji Verify - Collab Guide
      • Workflow
      • End User Guide
      • Functional Overview
    • Setup
      • Local Setup
      • Generate QR Code
    • Releases
      • Version 0.12.3
        • Test Report
      • Version 0.11.1
        • Test Report
      • Version 0.11.0
        • Test Report
      • Version 0.10.0
        • Test Report
      • Version 0.9.0
        • Test Report
      • Version 0.8.1
      • Version 0.8.0
        • Test Report
  • FAQ
Powered by GitBook

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

On this page
  • VCI-Client
  • Features:
  • Android: Kotlin package for vci-client:
  • Repository
  • Installation
  • APIs
  • Exceptions
  • More details
  • iOS: Swift package for vci-client:
  • Repository
  • Installation
  • APIs
  • VCI-Client and Inji Wallet integration:

Was this helpful?

Export as PDF
  1. Inji Wallet
  2. Inji Mobile
  3. Develop
  4. Integration Guides

VCI-Client

Last updated 6 months ago

Was this helpful?

VCI-Client

vci-client library enables to carry out the credential request from the consumer application (mobile wallet or web) and download the VC.

Features:

  • Creates a credential request with access token, issuer metadata, holder jwt proof.

  • Provide credential response (VC) to the consumer application.

  • Kotlin and Swift artefacts are available to integrate with the native mobile applications.

Below sections details on the steps for integrating the Kotlin and Swift packages into the app.

Android: Kotlin package for vci-client:

Repository

  • inji-vci-client repo is

    • Maven snapshots available

Installation

Note: implementation "io.mosip:inji-vci-client:0.1.0-SNAPSHOT"

APIs

1. Request Credential

Request for credential from the providers (credential issuer), and receive the credential.

val credentialResponse: CredentialResponse? = VCIClient().requestCredential(
                        IssuerMetaData( CREDENTIAL_AUDIENCE, CREDENTIAL_ENDPOINT, DOWNLOAD_TIMEOUT, CREDENTIAL_TYPE, CREDENTIAL_FORMAT ),
                        proofJwt,
                        accessToken
                    )

Parameters

Name
Type
Description
Sample

issuerMetaData

IssuerMetaData

Data object of the issuer details

IssuerMetaData(credentialAudience, credentialEndpoint, downloadTimeout, credentialType, credentialFormat)

proofJwt

Proof

The proof used for making credential request. Supported proof types : JWT.

JWTProof(jwtValue)

accessToken

String

token issued by providers based on auth code

""

Exceptions

  • DownloadFailedException is thrown when the credential issuer did not respond with credential response

  • NetworkRequestTimeoutException is thrown when the request is timedout

More details

An example app is added under /example folder which can be referenced for more details.

iOS: Swift package for vci-client:

Repository

https://github.com/mosip/inji-vci-client-ios-swift/

Installation

  1. Clone the repo

  2. In your swift application go to file > add package dependency > add thehttps://github.com/mosip/inji-vci-client-ios-swift in git search bar> add package

  3. Import the library and use.

APIs

1. Request Credential

Request for credential from the issuer, and receive the credential response back in string.

let requestCredential = try await VCIClient().requestCredential(issuerMeta: IssuerMeta, proofJwt: Proof, accessToken: String)

Parameters

Name
Type
Description
Sample

issuerMeta

IssuerMeta

struct of the issuer details like audience, endpoint, timeout, type and format

IssuerMeta(credentialAudience, credentialEndpoint, downloadTimeout, credentialType, credentialFormat)

proofJwt

Proof

The proof type ProofJwt ex jwt

JWTProof(jwt: proofJWT)

accessToken

String

token issued by providers based on auth code

""

Exceptions

  • DownloadFailedError is thrown when the credential issuer did not respond with credential response

  • NetworkRequestTimeOutError is thrown when the request is timedout

More details

An example app is added under /SwiftExample folder which can be referenced for more details. Extract the swift example app out of the library and then follow the installation steps.

VCI-Client and Inji Wallet integration:

The below diagram shows how Inji Wallet utilises vci-client library.

Snapshot builds are available .

here
here
here