vci-client library enables to carry out the credential request from the consumer application (mobile wallet or web) and download the VC.
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.
Snapshot builds are available here.
Note: implementation "io.mosip:inji-vci-client:0.1.0-SNAPSHOT"
1. Request Credential
Request for credential from the providers (credential issuer), and receive the credential.
Parameters
DownloadFailedException is thrown when the credential issuer did not respond with credential response
NetworkRequestTimeoutException is thrown when the request is timedout
An example app is added under /example folder which can be referenced for more details.
Clone the repo
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
Import the library and use.
1. Request Credential
Request for credential from the issuer, and receive the credential response back in string.
Parameters
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.
The below diagram shows how Inji Wallet utilises vci-client library.
Name | Type | Description | Sample |
---|---|---|---|
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
""
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
""