Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit

Permalink
[Android][iOS] Load arbitrary certificates into the verifier (#122)
Browse files Browse the repository at this point in the history
This adds a new feature that allows the user to upload certificates to be used during mDoc verifications.

Co-authored-by: Jacob <[email protected]>
  • Loading branch information
Juliano1612 and cobward authored Mar 5, 2025
1 parent 88aff4d commit 5b1981c
Show file tree
Hide file tree
Showing 23 changed files with 1,233 additions and 172 deletions.
2 changes: 1 addition & 1 deletion MobileSdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ android {
}

dependencies {
api("com.spruceid.mobile.sdk.rs:mobilesdkrs:0.8.5")
api("com.spruceid.mobile.sdk.rs:mobilesdkrs:0.9.0")
//noinspection GradleCompatible
implementation("com.android.support:appcompat-v7:28.0.0")
/* Begin UI dependencies */
Expand Down
8 changes: 6 additions & 2 deletions example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId = "com.spruceid.mobilesdkexample"
minSdk = 26
targetSdk = 34
versionCode = 29
versionName = "1.7.0"
versionCode = 32
versionName = "1.7.3"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down Expand Up @@ -53,6 +53,10 @@ android {
}
}

ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}

dependencies {
val roomVersion = "2.4.0"

Expand Down
202 changes: 202 additions & 0 deletions example/schemas/com.spruceid.mobilesdkexample.db.AppDatabase/5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"formatVersion": 1,
"database": {
"version": 5,
"identityHash": "e399172150197fe2b7b9d8fb61420024",
"entities": [
{
"tableName": "wallet_activity_logs",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `credentialPackId` TEXT NOT NULL, `credentialId` TEXT NOT NULL, `credentialTitle` TEXT NOT NULL, `issuer` TEXT NOT NULL, `action` TEXT NOT NULL, `dateTime` INTEGER NOT NULL, `additionalInformation` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "credentialPackId",
"columnName": "credentialPackId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "credentialId",
"columnName": "credentialId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "credentialTitle",
"columnName": "credentialTitle",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "issuer",
"columnName": "issuer",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "action",
"columnName": "action",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "dateTime",
"columnName": "dateTime",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "additionalInformation",
"columnName": "additionalInformation",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "verification_activity_logs",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `credentialTitle` TEXT NOT NULL, `issuer` TEXT NOT NULL, `status` TEXT NOT NULL, `verificationDateTime` INTEGER NOT NULL, `additionalInformation` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "credentialTitle",
"columnName": "credentialTitle",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "issuer",
"columnName": "issuer",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "status",
"columnName": "status",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "verificationDateTime",
"columnName": "verificationDateTime",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "additionalInformation",
"columnName": "additionalInformation",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "raw_credentials",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `rawCredential` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "rawCredential",
"columnName": "rawCredential",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "verification_methods",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `type` TEXT NOT NULL, `name` TEXT NOT NULL, `description` TEXT NOT NULL, `verifierName` TEXT NOT NULL, `url` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "description",
"columnName": "description",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "verifierName",
"columnName": "verifierName",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "url",
"columnName": "url",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e399172150197fe2b7b9d8fb61420024')"
]
}
}
Loading

0 comments on commit 5b1981c

Please sign in to comment.