-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #160 from walt-id/trust-registry-integration
Trust registry integration
- Loading branch information
Showing
41 changed files
with
871 additions
and
749 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,10 +1,8 @@ | ||
entra: { | ||
issuer: { | ||
baseUrl = "<url>" | ||
trustRecordPath = "<path>" | ||
} | ||
verifier: { | ||
baseUrl = "<url>" | ||
trustRecordPath = "<path>" | ||
} | ||
issuersRecord: { | ||
baseUrl = "<url>" | ||
trustRecordPath = "<path>" | ||
} | ||
verifiersRecord: { | ||
baseUrl = "<url>" | ||
trustRecordPath = "<path>" | ||
} |
This file contains 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 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 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
16 changes: 6 additions & 10 deletions
16
waltid-wallet-api/src/main/kotlin/id/walt/webwallet/config/TrustConfig.kt
This file contains 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 |
---|---|---|
@@ -1,15 +1,11 @@ | ||
package id.walt.webwallet.config | ||
|
||
data class TrustConfig( | ||
val entra: TrustEntry? = null | ||
val issuersRecord: TrustRecord, | ||
val verifiersRecord: TrustRecord | ||
) : WalletConfig { | ||
data class TrustEntry( | ||
val issuer: TrustItem, | ||
val verifier: TrustItem, | ||
) { | ||
data class TrustItem( | ||
val baseUrl: String, | ||
val trustRecordPath: String, | ||
) | ||
} | ||
data class TrustRecord( | ||
val baseUrl: String, | ||
val trustRecordPath: String, | ||
) | ||
} |
This file contains 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
23 changes: 1 addition & 22 deletions
23
waltid-wallet-api/src/main/kotlin/id/walt/webwallet/db/models/Issuers.kt
This file contains 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 |
---|---|---|
@@ -1,28 +1,7 @@ | ||
package id.walt.webwallet.db.models | ||
|
||
import kotlinx.uuid.UUID | ||
import kotlinx.uuid.exposed.KotlinxUUIDTable | ||
import org.jetbrains.exposed.sql.ResultRow | ||
|
||
object Issuers : KotlinxUUIDTable("issuers") { | ||
val name = varchar("name", 512).uniqueIndex() | ||
val description = text("description").nullable().default("no description") | ||
val uiEndpoint = varchar("ui", 128) | ||
val configurationEndpoint = varchar("configuration", 256) | ||
} | ||
|
||
data class Issuer( | ||
val id: UUID, | ||
val name: String, | ||
val description: String? = null, | ||
val uiEndpoint: String, | ||
val configurationEndpoint: String, | ||
) { | ||
constructor(result: ResultRow) : this( | ||
id = result[Issuers.id].value, | ||
name = result[Issuers.name], | ||
description = result[Issuers.description], | ||
uiEndpoint = result[Issuers.uiEndpoint], | ||
configurationEndpoint = result[Issuers.configurationEndpoint] | ||
) | ||
} | ||
} |
This file contains 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 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
11 changes: 11 additions & 0 deletions
11
waltid-wallet-api/src/main/kotlin/id/walt/webwallet/seeker/DefaultCredentialTypeSeeker.kt
This file contains 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,11 @@ | ||
package id.walt.webwallet.seeker | ||
|
||
import kotlinx.serialization.json.JsonObject | ||
import kotlinx.serialization.json.jsonArray | ||
import kotlinx.serialization.json.jsonObject | ||
import kotlinx.serialization.json.jsonPrimitive | ||
|
||
class DefaultCredentialTypeSeeker : Seeker<String> { | ||
override fun get(data: JsonObject): String = | ||
data.jsonObject["type"]?.jsonArray?.last()?.jsonPrimitive?.content ?: "n/a" | ||
} |
9 changes: 9 additions & 0 deletions
9
waltid-wallet-api/src/main/kotlin/id/walt/webwallet/seeker/DefaultDidSeeker.kt
This file contains 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,9 @@ | ||
package id.walt.webwallet.seeker | ||
|
||
import kotlinx.serialization.json.JsonObject | ||
import kotlinx.serialization.json.jsonObject | ||
import kotlinx.serialization.json.jsonPrimitive | ||
|
||
class DefaultDidSeeker : Seeker<String> { | ||
override fun get(data: JsonObject): String = data.jsonObject["iss"]?.jsonPrimitive?.content ?: "n/a" | ||
} |
11 changes: 0 additions & 11 deletions
11
waltid-wallet-api/src/main/kotlin/id/walt/webwallet/seeker/EntraCredentialTypeSeeker.kt
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
waltid-wallet-api/src/main/kotlin/id/walt/webwallet/seeker/EntraDidSeeker.kt
This file was deleted.
Oops, something went wrong.
5 changes: 3 additions & 2 deletions
5
waltid-wallet-api/src/main/kotlin/id/walt/webwallet/seeker/Seeker.kt
This file contains 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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
package id.walt.webwallet.seeker | ||
|
||
import id.walt.webwallet.db.models.WalletCredential | ||
import kotlinx.serialization.json.JsonObject | ||
|
||
|
||
interface Seeker<T> { | ||
fun get(credential: WalletCredential): T | ||
fun get(data: JsonObject): T | ||
} |
Oops, something went wrong.