-
Notifications
You must be signed in to change notification settings - Fork 167
feat(sample-app): integrate OpenID4VP flow and expand sample wallet #2298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kaushikgupta469
wants to merge
6
commits into
inji:develop
Choose a base branch
from
Kaushikgupta469:sample-ovp-feature
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e4bdef4
feat(sample-app): integrate OpenID4VP flow and expand sample wallet c…
Kaushikgupta469 cf28b4e
INJIMOB-Github-issue-2120: Refractor codes and cleanup
Kaushikgupta469 cb83ced
INJIMOB-Issue-2120: feat sample wallet with vp feature
Kaushikgupta469 dea74ba
feat(Issue-2120): Integrate OpenID4VP flow and expand sample wallet f…
Kaushikgupta469 f5e8bc1
feat(Issue-2120): Refractoring changes for vp request and cleanup
Kaushikgupta469 d0357e1
feat(SampleApp): Update the openid4vp aar
Kaushikgupta469 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...mple-application/app/src/main/java/com/example/samplecredentialwallet/ovp/data/OVPData.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| package com.example.samplecredentialwallet.ovp.data | ||
|
|
||
| import com.fasterxml.jackson.databind.PropertyNamingStrategies | ||
| import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper | ||
| import com.fasterxml.jackson.module.kotlin.readValue | ||
| import io.mosip.openID4VP.authorizationRequest.VPFormatSupported | ||
| import io.mosip.openID4VP.authorizationRequest.Verifier | ||
| import io.mosip.openID4VP.authorizationRequest.WalletMetadata | ||
| import io.mosip.openID4VP.constants.ClientIdScheme | ||
| import io.mosip.openID4VP.constants.ContentEncryptionAlgorithm | ||
| import io.mosip.openID4VP.constants.KeyManagementAlgorithm | ||
| import io.mosip.openID4VP.constants.RequestSigningAlgorithm | ||
| import io.mosip.openID4VP.constants.VPFormatType | ||
|
|
||
| object OVPData { | ||
| fun getWalletMetadata(): WalletMetadata { | ||
| return WalletMetadata( | ||
| presentationDefinitionURISupported = true, | ||
| vpFormatsSupported = mapOf( | ||
| VPFormatType.LDP_VC to VPFormatSupported( | ||
| algValuesSupported = listOf("Ed25519Signature2018", "Ed25519Signature2020", "RSASignature2018") | ||
| ), | ||
| VPFormatType.MSO_MDOC to VPFormatSupported( | ||
| algValuesSupported = listOf("ES256") | ||
| ) | ||
| ), | ||
| clientIdSchemesSupported = listOf( | ||
| ClientIdScheme.REDIRECT_URI, | ||
| ClientIdScheme.DID, | ||
| ClientIdScheme.PRE_REGISTERED | ||
| ), | ||
| requestObjectSigningAlgValuesSupported = listOf(RequestSigningAlgorithm.EdDSA), | ||
| authorizationEncryptionAlgValuesSupported = listOf(KeyManagementAlgorithm.ECDH_ES), | ||
| authorizationEncryptionEncValuesSupported = listOf(ContentEncryptionAlgorithm.A256GCM) | ||
| ) | ||
| } | ||
|
|
||
| fun getTrustedVerifiers(): List<Verifier> { | ||
| // Replace with your verifier configuration for non-demo usage. | ||
| val verifierJson = """ | ||
| [ | ||
| { | ||
| "client_id": "mock-client", | ||
| "response_uris": [ | ||
| "https://localhost:3000/verifier/vp-response" | ||
| ], | ||
| "jwks_uri": "https://localhost:3000/.well-known/jwks.json" | ||
| } | ||
| ] | ||
| """.trimIndent() | ||
|
|
||
| val objectMapper = jacksonObjectMapper() | ||
| .setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE) | ||
|
|
||
| return objectMapper.readValue(verifierJson) | ||
| } | ||
| } |
10 changes: 10 additions & 0 deletions
10
...e-application/app/src/main/java/com/example/samplecredentialwallet/ovp/data/VCMetadata.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package com.example.samplecredentialwallet.ovp.data | ||
|
|
||
| import com.google.gson.JsonObject | ||
|
|
||
| data class VCMetadata( | ||
| val format: String, | ||
| val vc: JsonObject, | ||
| val rawCBORData: String? = null, | ||
| val deviceKeyAlias: String? = null | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.