repo_name stringlengths 1 62 | dataset stringclasses 1
value | lang stringclasses 11
values | pr_id int64 1 20.1k | owner stringlengths 2 34 | reviewer stringlengths 2 39 | diff_hunk stringlengths 15 262k | code_review_comment stringlengths 1 99.6k |
|---|---|---|---|---|---|---|---|
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -117,6 +121,7 @@ kotlin {
val jvmMain by getting {
dependencies {
implementation("com.nimbusds:nimbus-jose-jwt:9.40")
+ implementation(project(":waltid-libraries:waltid-crypto")) | shouldn't it be used as an `api` configuration? |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,56 @@
+package id.walt.sdjwt
+
+import korlibs.crypto.SHA256
+import korlibs.crypto.encoding.ASCII
+import kotlinx.datetime.Clock
+import kotlinx.serialization.json.*
+import kotlin.js.ExperimentalJsExport
+import kotlin.js.JsExport
+
+@OptIn(ExperimentalJsExport::class)
+@JsExport
+class KeyBindingJwt(jwt: ... | `issuedAt` seems not used, is it on purpose? |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,56 @@
+package id.walt.sdjwt
+
+import korlibs.crypto.SHA256
+import korlibs.crypto.encoding.ASCII
+import kotlinx.datetime.Clock
+import kotlinx.serialization.json.*
+import kotlin.js.ExperimentalJsExport
+import kotlin.js.JsExport
+
+@OptIn(ExperimentalJsExport::class)
+@JsExport
+class KeyBindingJwt(jwt: ... | ide shows 'non-exportable type' warning
shouldn't it be JsExport.Ignore? |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,115 @@
+package id.walt.sdjwt
+import kotlinx.datetime.Clock
+import kotlinx.serialization.json.*
+
+class SDJwtVC(sdJwt: SDJwt): SDJwt(sdJwt.jwt, sdJwt.header, sdJwt.sdPayload, sdJwt.keyBindingJwt, sdJwt.isPresentation) {
+
+ val cnfObject: JsonObject? = undisclosedPayload["cnf"]?.jsonObject
+ val holderD... | seems not used anywhere |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -21,3 +21,16 @@ data class VerificationResult<T : SDJwt>(
val verified
get() = signatureVerified && disclosuresVerified
}
+
+class VCVerificationResult(
+ val sdJwtVC: SDJwtVC, | seems not used anywhere |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -33,3 +33,16 @@ class SimpleJWTCryptoProvider(
}
}
+class SimpleMultiKeyJWTCryptoProvider( | is it still required? looks like it's not used |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,22 @@
+package id.walt.sdjwt | this looks like it could use some formatting |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,244 @@
+import COSE.AlgorithmID
+import com.nimbusds.jose.JWSAlgorithm
+import com.nimbusds.jose.crypto.ECDSASigner
+import com.nimbusds.jose.crypto.ECDSAVerifier
+import com.nimbusds.jose.jwk.ECKey
+import com.nimbusds.jose.jwk.JWK
+import com.nimbusds.jose.jwk.KeyUse
+import com.nimbusds.jose.util.Base64UR... | maybe this can be removed? |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -104,6 +104,17 @@ dependencies {
api(project(":waltid-libraries:waltid-verifiable-credentials"))
api(project(":waltid-libraries:waltid-sdjwt"))
+ api(project(":waltid-libraries:waltid-mdoc-credentials"))
+
+ // TODO: REMOVE:
+ implementation("com.nimbusds:nimbus-jose-jwt:9.37.3") | could it be removed at this stage?
otherwise, maybe an issue on gh to fix it would help to keep an eye on it? |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -138,16 +175,37 @@ open class CIProvider : OpenIDCredentialIssuer(
log.debug { "JWS Verification: target: $target" }
val tokenHeader = Json.parseToJsonElement(Base64.decode(token.split(".")[0]).decodeToString()).jsonObject
- if (tokenHeader["kid"] != null) {
+ val key = if(tokenHead... | perhaps this could be removed? |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -247,33 +293,106 @@ open class CIProvider : OpenIDCredentialIssuer(
issuerKid = issuerDid + "#" + issuerKey.getKeyId()
when (credentialRequest.format) {
- CredentialFormat.sd_jwt_vc -> vc.mergingSdJwtIssue(
- issuerKey = issuerKey,
- ... | maybe this could be cleaned up? |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -3,6 +3,7 @@ package id.walt.issuer.issuance
import id.walt.credentials.vc.vcs.W3CVC
import id.walt.crypto.keys.KeyManager
import id.walt.crypto.keys.KeySerialization
+import id.walt.crypto.keys.jwk.JWKKey | these 2 imports seem to be not required anymore |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -1,6 +1,9 @@
package id.walt.issuer.issuance
+import com.nimbusds.jose.jwk.JWK | these imports seem unrequired |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,122 @@
+package id.walt.issuer.lspPotential
+
+import COSE.AlgorithmID
+import com.nimbusds.jose.JWSAlgorithm
+import com.nimbusds.jose.crypto.ECDSASigner
+import com.nimbusds.jose.crypto.ECDSAVerifier
+import com.nimbusds.jose.jwk.ECKey
+import id.walt.credentials.vc.vcs.W3CVC
+import id.walt.crypto.keys.Ke... | is still required? seems it's not used anywhere |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,122 @@
+package id.walt.issuer.lspPotential
+
+import COSE.AlgorithmID
+import com.nimbusds.jose.JWSAlgorithm
+import com.nimbusds.jose.crypto.ECDSASigner
+import com.nimbusds.jose.crypto.ECDSAVerifier
+import com.nimbusds.jose.jwk.ECKey
+import id.walt.credentials.vc.vcs.W3CVC
+import id.walt.crypto.keys.Ke... | same as the other one |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,86 @@
+package id.walt
+
+import COSE.AlgorithmID
+import COSE.OneKey
+import cbor.Cbor
+import com.nimbusds.jose.jwk.JWK
+import com.nimbusds.jose.util.X509CertUtils
+import com.upokecenter.cbor.CBORObject
+import id.walt.crypto.utils.Base64Utils.base64UrlDecode
+import id.walt.did.dids.DidService
+import i... | is the assert still relevant? |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,86 @@
+package id.walt
+
+import COSE.AlgorithmID
+import COSE.OneKey
+import cbor.Cbor
+import com.nimbusds.jose.jwk.JWK
+import com.nimbusds.jose.util.X509CertUtils
+import com.upokecenter.cbor.CBORObject
+import id.walt.crypto.utils.Base64Utils.base64UrlDecode
+import id.walt.did.dids.DidService
+import i... | `x5c` seems unused |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,86 @@
+package id.walt
+
+import COSE.AlgorithmID
+import COSE.OneKey
+import cbor.Cbor
+import com.nimbusds.jose.jwk.JWK
+import com.nimbusds.jose.util.X509CertUtils
+import com.upokecenter.cbor.CBORObject
+import id.walt.crypto.utils.Base64Utils.base64UrlDecode
+import id.walt.did.dids.DidService
+import i... | could this be cleaned up? or maybe it's still relevant? |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,86 @@
+package id.walt
+
+import COSE.AlgorithmID
+import COSE.OneKey
+import cbor.Cbor
+import com.nimbusds.jose.jwk.JWK
+import com.nimbusds.jose.util.X509CertUtils
+import com.upokecenter.cbor.CBORObject
+import id.walt.crypto.utils.Base64Utils.base64UrlDecode
+import id.walt.did.dids.DidService
+import i... | doesn't it require `DidService.minimalInit()`? |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -1,4 +1,4 @@
baseUrl = "http://localhost:7003"
-requestSigningKeyFile = "/tmp/ec.key"
-requestSigningCertFile = "/tmp/ec.crt"
+requestSigningKeyFile = "./src/test/resources/ec-potential.key" | just making sure this is intended,
is this a good location for resources, seems to be referencing the test folder? |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,183 @@
+package id.walt.verifier.lspPotential
+
+import COSE.AlgorithmID
+import COSE.OneKey
+import cbor.Cbor
+import com.nimbusds.jose.JWSAlgorithm
+import com.nimbusds.jose.crypto.ECDSASigner
+import com.nimbusds.jose.crypto.ECDSAVerifier
+import com.nimbusds.jose.jwk.Curve
+import com.nimbusds.jose.jwk.E... | ide suggest function could be private |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,183 @@
+package id.walt.verifier.lspPotential
+
+import COSE.AlgorithmID
+import COSE.OneKey
+import cbor.Cbor
+import com.nimbusds.jose.JWSAlgorithm
+import com.nimbusds.jose.crypto.ECDSASigner
+import com.nimbusds.jose.crypto.ECDSAVerifier
+import com.nimbusds.jose.jwk.Curve
+import com.nimbusds.jose.jwk.E... | ide suggests function could be private |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,183 @@
+package id.walt.verifier.lspPotential
+
+import COSE.AlgorithmID
+import COSE.OneKey
+import cbor.Cbor
+import com.nimbusds.jose.JWSAlgorithm
+import com.nimbusds.jose.crypto.ECDSASigner
+import com.nimbusds.jose.crypto.ECDSAVerifier
+import com.nimbusds.jose.jwk.Curve
+import com.nimbusds.jose.jwk.E... | maybe use logger instead of `println`? |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,183 @@
+package id.walt.verifier.lspPotential
+
+import COSE.AlgorithmID
+import COSE.OneKey
+import cbor.Cbor
+import com.nimbusds.jose.JWSAlgorithm
+import com.nimbusds.jose.crypto.ECDSASigner
+import com.nimbusds.jose.crypto.ECDSAVerifier
+import com.nimbusds.jose.jwk.Curve
+import com.nimbusds.jose.jwk.E... | same here |
waltid-identity | github_2023 | others | 575 | walt-id | mikeplotean | @@ -0,0 +1,183 @@
+package id.walt.verifier.lspPotential
+
+import COSE.AlgorithmID
+import COSE.OneKey
+import cbor.Cbor
+import com.nimbusds.jose.JWSAlgorithm
+import com.nimbusds.jose.crypto.ECDSASigner
+import com.nimbusds.jose.crypto.ECDSAVerifier
+import com.nimbusds.jose.jwk.Curve
+import com.nimbusds.jose.jwk.E... | and here |
waltid-identity | github_2023 | others | 591 | walt-id | mikeplotean | @@ -60,6 +60,18 @@ The complete class hierarchy can be viewed in the [class diagram](did-lib_class.
## How to use it
+### Local Resolver & Registrar Setup
+This function initializes the DidService instance with the local DID registrars and resolvers.
+```kotlin
+DidService.minimalInit()
+```
+### Standard Setup
+... | oops a typo, should be using |
waltid-identity | github_2023 | others | 591 | walt-id | mikeplotean | @@ -61,11 +61,11 @@ docker build -t waltid/wallet-api -f waltid-services/waltid-wallet-api/Dockerfil
Currently, the following databases can be used:
-- sqlite (db.sqlite.conf)
-- postgres (db.postgres.conf)
-- microsoft sql server (db.mssql.conf)
+- sqlite
+- postgres
+- microsoft sql server
-The configuration... | nitpicking alert! 'contain' should end in 's' because now it refers to a single configuration |
waltid-identity | github_2023 | others | 591 | walt-id | mikeplotean | @@ -339,7 +339,7 @@ class SSIKit2WalletService(
return result.did
}
- override suspend fun listDids() = transaction { DidsService.list(walletId) }
+ override suspend fun listDids() = DidsService.list(walletId) | please use the ide formatting features - there seems to be an additional white-space |
waltid-identity | github_2023 | others | 591 | walt-id | mikeplotean | @@ -26,7 +25,7 @@ fun Application.dids() = walletRoute {
}
}
}) {
- context.respond(getWalletService().run { transaction { runBlocking { listDids() } } })
+ context.respond(getWalletService().run { runBlocking { listDids() } }) | another white-space |
waltid-identity | github_2023 | others | 648 | walt-id | SuperBatata | @@ -0,0 +1,33 @@
+package id.walt.credentials.verification
+
+import id.walt.credentials.Claims
+import kotlinx.datetime.Instant
+import kotlinx.serialization.json.JsonObject
+import kotlinx.serialization.json.JsonPrimitive
+import kotlinx.serialization.json.jsonObject
+import kotlinx.serialization.json.jsonPrimitive
+... | Maybe using a more specific Error Handling option is better |
waltid-identity | github_2023 | others | 630 | walt-id | waltkb | @@ -39,26 +42,41 @@ object JvmJWKKeyCreator : JWKKeyCreator {
return JWKKey(jwk)
}
- override suspend fun importRawPublicKey(type: KeyType, rawPublicKey: ByteArray, metadata: JwkKeyMeta?): Key = JWKKey(
- when (type) {
- KeyType.Ed25519 -> OctetKeyPair.Builder(Curve.Ed25519, Base64U... | Good compromise |
waltid-identity | github_2023 | others | 570 | walt-id | waltkb | @@ -0,0 +1,74 @@
+package id.walt.did.dids.document
+
+import kotlinx.serialization.*
+import kotlinx.serialization.json.*
+import kotlin.js.ExperimentalJsExport
+import kotlin.js.JsExport
+import kotlin.js.JsName
+
+@JsExport
+@OptIn(ExperimentalSerializationApi::class, ExperimentalJsExport::class)
+@Serializable
+dat... | move `json` outside the class or into companion object |
waltid-identity | github_2023 | others | 570 | walt-id | waltkb | @@ -22,36 +24,33 @@ import kotlin.js.JsExport
@OptIn(ExperimentalJsExport::class)
@JsExport
-class DidEbsiResolver : LocalResolverMethod("ebsi") {
+class DidEbsiResolver(
+ private val client: HttpClient,
+) : LocalResolverMethod("ebsi") {
val httpLogging = false
+ private val didRegistryUrlBaseURL = "... | does it make sense to make the URL configurable? |
waltid-identity | github_2023 | others | 494 | walt-id | waltkb | @@ -47,5 +47,11 @@ include(
":waltid-libraries:waltid-crypto-android",
":waltid-applications:waltid-android"
*/
+
+ // iOS - uncomment to enable build:
+// /*
+ ":waltid-libraries:waltid-crypto-ios", | comment by default (at least the end commit before merge) |
waltid-identity | github_2023 | others | 494 | walt-id | waltkb | @@ -0,0 +1,164 @@
+package id.walt.crypto
+
+import id.walt.crypto.keys.Key
+import id.walt.crypto.keys.KeyMeta
+import id.walt.crypto.keys.KeyType
+import id.walt.crypto.utils.Base64Utils.base64UrlDecode
+import id.walt.crypto.utils.Base64Utils.encodeToBase64Url
+import id.walt.crypto.utils.JsonUtils.toJsonObject
+imp... | Necessary to have split from JwkKey? |
waltid-identity | github_2023 | others | 494 | walt-id | waltkb | @@ -0,0 +1,49 @@
+package id.walt.crypto
+
+import id.walt.crypto.keys.Key
+import id.walt.crypto.keys.KeyType
+
+abstract class IosKey: Key() { | Is there a reason to deviate from the implementation of Android (having an `JWKKey` (private key as JWK) and an `AndroidKey` (private key in Android KeyStore); so e.g.
- JWKKey.ios.kt -> Implementation of standard JWKKey (public or private key, with key represented as JWK)
- IosKey.kt -> iOS specific private key, w... |
waltid-identity | github_2023 | others | 494 | walt-id | waltkb | @@ -0,0 +1,231 @@
+package id.walt.crypto
+
+import id.walt.crypto.keys.JwkKeyMeta
+import id.walt.crypto.keys.Key
+import id.walt.crypto.keys.KeyMeta
+import id.walt.crypto.keys.KeyType
+import id.walt.platform.utils.ios.DS_Operations
+import id.walt.platform.utils.ios.ECKeyUtils
+import kotlinx.cinterop.ptr
+import k... | see above |
waltid-identity | github_2023 | others | 494 | walt-id | waltkb | @@ -0,0 +1,210 @@
+package id.walt.crypto
+
+import id.walt.crypto.keys.Key
+import id.walt.crypto.keys.KeyMeta
+import id.walt.crypto.keys.KeyType
+import id.walt.platform.utils.ios.DS_Operations
+import id.walt.platform.utils.ios.RSAKeyUtils
+import io.ktor.util.encodeBase64
+import kotlinx.cinterop.ptr
+import kotli... | see above |
waltid-identity | github_2023 | others | 77 | walt-id | philpotisk | @@ -444,13 +444,14 @@ class SSIKit2WalletService(tenant: String, accountId: UUID, walletId: UUID) :
// val responseToken = SDJwt.sign(responseTokenPayload, jwtCryptoProvider, TEST_WALLET_DID + "#${testWalletKey.getKeyId()}").toString()
// *) POST response JWT token to return address found in manifest... | Plz remove println and use a logger instead |
waltid-identity | github_2023 | others | 400 | walt-id | mikeplotean | @@ -150,10 +148,29 @@ fun Application.issuerApi() {
val key = KeyManager.createKey(keyGenerationRequest)
val did = DidService.registerDefaultDidMethodByKey(req.didMethod, key, req.didConfig).did
+
+
val serializedKey = KeySerialization.serializeKeyToJson(key)
+
+ ... | can't it be used like
`val jsonObject = serializedKey.jsonObject`
? |
waltid-identity | github_2023 | others | 400 | walt-id | mikeplotean | @@ -150,10 +148,29 @@ fun Application.issuerApi() {
val key = KeyManager.createKey(keyGenerationRequest)
val did = DidService.registerDefaultDidMethodByKey(req.didMethod, key, req.didConfig).did
+
+
val serializedKey = KeySerialization.serializeKeyToJson(key)
+
+ ... | I think this can be simplified (no need for jwkString), for example:
```
val jwkObject = jsonObject["jwk"] ?: throw IllegalArgumentException(
"No JWK key found in serialized key."
)
val finalJsonObject = jsonObject.toMutableMap().apply {
this["jwk"] = jwkObject
}
``` |
waltid-identity | github_2023 | others | 436 | walt-id | waltkb | @@ -251,7 +251,7 @@ actual class JWKKey actual constructor(
@JsPromise
@JsExport.Ignore
- actual override suspend fun getKeyId(): String = _internalJwk.kid ?: getThumbprint()
+ actual override suspend fun getKeyId(): String = getThumbprint() | some way to not remove this everywhere? after all, the fingerprint is not the key id |
waltid-identity | github_2023 | others | 436 | walt-id | waltkb | @@ -15,6 +15,11 @@ object ConfigManager {
val registeredConfigurations = ArrayList<Pair<String, KClass<out BaseConfig>>>()
val loadedConfigurations = HashMap<String, BaseConfig>()
+ private val preloadedConfigurations = HashMap<String, BaseConfig>() | we'll switch to a different config system with the commons branch |
waltid-identity | github_2023 | others | 436 | walt-id | waltkb | @@ -112,6 +112,9 @@ dependencies {
testImplementation(project(":waltid-issuer-api"))
testImplementation(project(":waltid-verifier-api"))
+ implementation("org.junit.jupiter:junit-jupiter-api:5.10.2") | New test framework again? And it's a main dependency? |
waltid-identity | github_2023 | others | 436 | walt-id | waltkb | @@ -91,13 +94,15 @@ object Db {
val walletResult = AccountsService.getAccountWalletMappings("", accountId)
val walletId = walletResult.wallets[0].id
+ val encodedString: String = Base64.getEncoder().encodeToString(IssuanceExamples.openBadgeCredentialExampleJsonString.t... | What is `encodedString` for? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,30 @@
+# Breaking changes since 0.3.1
+
+## Configuration:
+
+#### Feature system
+- Introduced feature system, which is controlled by `_features.conf`.
+
+#### Database (waltid-wallet-api)
+- Unified `db.sqlite.conf`, `db.postgres.conf`, `db.mssql.conf`, `db.conf` (referencing either of the first 3) to just... | just to be aware of it,
this will break the utility related to db engines
because with this approach, it will require
- updating the .env file with the desired db engine (so that the related services are started)
- and the datasource config file itself - with the desired data connection (jdbcUrl, user / password, e... |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,30 @@
+# Breaking changes since 0.3.1
+
+## Configuration:
+
+#### Feature system
+- Introduced feature system, which is controlled by `_features.conf`.
+
+#### Database (waltid-wallet-api)
+- Unified `db.sqlite.conf`, `db.postgres.conf`, `db.mssql.conf`, `db.conf` (referencing either of the first 3) to just... | maybe this can be removed |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -45,33 +45,33 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
- api(project(":waltid-crypto"))
- api(project(":waltid-did"))
- api(project(":waltid-verifiable-credentials"))
- api(project(":waltid-sdjwt"))
- ... | is it still required, otherwise maybe it can be removed? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -75,14 +75,14 @@ kotlin {
sourceSets {
/* val commonMain by getting { | is it relevat for android lib? maybe it can be removed |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -111,13 +111,13 @@ kotlin {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
- implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.0")
+ implementation("org.jetbrains.kotli... | if theses dependencies are not required anymore, maybe they can be cleaned out |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -73,7 +73,7 @@ kotlin {
dependencies {
// JSON
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
- implementation("io.github.optimumcode:json-schema-validator:0.0.8")
+// implementation("io.github.optimumcode:json-sch... | same as above, maybe the unnecessary dependencies can be cleaned up |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -6,7 +6,6 @@ import id.walt.did.dids.registrar.local.key.DidKeyRegistrar
import id.walt.did.dids.resolver.local.DidKeyResolver
import id.walt.did.localresolvers.LocalResolverTestUtils.testDids
import kotlinx.coroutines.test.runTest
-import kotlin.test.Test | there's a 'FIXME' and 'TODO enable' for the tests, are they still relevant? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -7,7 +7,6 @@ import id.walt.did.dids.registrar.dids.DidCheqdCreateOptions
import id.walt.did.dids.registrar.dids.DidCreateOptions
import id.walt.did.dids.registrar.local.cheqd.DidCheqdRegistrar
import kotlinx.coroutines.runBlocking
-import org.junit.jupiter.params.ParameterizedTest | there's a 'FIXME' for tests, is it still relevant? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -73,48 +73,48 @@ kotlin {
// else -> throw GradleException("Host OS is not supported in Kotlin/Native.") | maybe the commented code can be removed? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -126,12 +126,12 @@ kotlin {
val jvmTest by getting {
dependencies {
//implementation("io.mockk:mockk:1.13.2")
- implementation("com.nimbusds:nimbus-jose-jwt:9.37.3")
- implementation("io.kotest:kotest-runner-junit5:5.8.0")
- implemen... | same with unrequired dependencies, perhaps it can be removed?
about the TODO - is still relevant? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -62,19 +62,19 @@ kotlin {
implementation("it.justwrote:kjob-kron:0.2.0")*/ | maybe comments can be cleaned up? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -26,8 +26,8 @@ kotlin {
}
}
+ jvmToolchain(15) // 16 possible? | should it be updated to 16? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -49,13 +49,13 @@ kotlin {
val testEngine = mapOf(
"chromium" to { useChromiumHeadless() },
- "chrome" to { useChromeHeadless() },
+ "firefox" to { useFirefoxHeadless() },
"/Applications/Google Chrom... | perhaps the commented line is not necessary |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -111,7 +111,7 @@ kotlin {
implementation("io.ktor:ktor-client-okhttp:$ktor_version")
// Logging
- implementation("org.slf4j:slf4j-simple:2.0.13")
+ // implementation("org.slf4j:slf4j-simple:2.0.13") | probably can be removed as well |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -15,7 +15,7 @@ import love.forte.plugin.suspendtrans.annotation.JvmBlocking
import kotlin.js.ExperimentalJsExport
import kotlin.js.JsExport
-private val log = KotlinLogging.logger { }
+private val log = KotlinLogging.logger { } | maybe it can be renamed to `logger` |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,28 @@
+supportedCredentialTypes = { | just putting it here so not to forget
a new supported credential - BoardingPass (https://github.com/walt-id/waltid-identity/pull/468) |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,64 @@
+import E2ETestWebService.test
+import E2ETestWebService.testBlock
+import id.walt.crypto.utils.JsonUtils.toJsonObject
+import io.ktor.client.*
+import io.ktor.client.engine.cio.*
+import io.ktor.client.plugins.*
+import io.ktor.client.plugins.contentnegotiation.*
+import io.ktor.client.plugins.logging... | is this client initialization required? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,136 @@
+import com.github.ajalt.mordant.rendering.AnsiLevel
+import com.github.ajalt.mordant.rendering.TextColors
+import com.github.ajalt.mordant.rendering.TextStyles
+import com.github.ajalt.mordant.terminal.Terminal
+import id.walt.commons.ServiceConfiguration
+import id.walt.commons.ServiceInitialization... | perhaps the commented code can be removed |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,136 @@
+import com.github.ajalt.mordant.rendering.AnsiLevel
+import com.github.ajalt.mordant.rendering.TextColors
+import com.github.ajalt.mordant.rendering.TextStyles
+import com.github.ajalt.mordant.terminal.Terminal
+import id.walt.commons.ServiceConfiguration
+import id.walt.commons.ServiceInitialization... | is the terminal required or maybe it can be replaced by logger? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -12,14 +13,14 @@ plugins {
kotlin("jvm") // Versions.KOTLIN_VERSION
kotlin("plugin.serialization") // Versions.KOTLIN_VERSION
- //id("io.ktor.plugin") version "2.3.8" // Versions.KTOR_VERSION
- id("io.ktor.plugin") version "2.3.8" // Versions.KTOR_VERSION
- id("org.owasp.dependencycheck") versi... | maybe the comments can be removed?
also below, slf4j and test dependencies |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -96,17 +101,17 @@ dependencies {
//testImplementation("io.ktor:ktor-server-tests-jvm:${Versions.KTOR_VERSION}")
// OIDC
- api(project(":waltid-openid4vc"))
+ api(project(":waltid-libraries:waltid-openid4vc"))
// walt.id
- api(project(":waltid-crypto"))
- api(project(":waltid-did"))
+ ... | is it still relevant? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,2 @@
+baseUrl = "http://localhost:7002"
+; baseUrl = "https://94f6-2a02-85f-e4ab-48cf-be19-8cec-bc38-d202.ngrok-free.app" | maybe the custom baseUrl value can be removed? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,54 @@
+plugins {
+ kotlin("jvm")
+ kotlin("plugin.serialization")
+// id("io.ktor.plugin") version "2.3.11" | are the comments still relevant? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,78 @@
+package id.walt.commons
+
+import id.walt.commons.config.buildconfig.BuildConfig
+import id.walt.commons.featureflag.CommonsFeatureCatalog
+import id.walt.commons.featureflag.FeatureManager
+import id.walt.commons.featureflag.ServiceFeatureCatalog
+import io.klogging.logger
+import kotlinx.coroutines.... | this looks like a leftover, please remove it if it is |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,133 @@
+package id.walt.commons.config
+
+import com.sksamuel.hoplite.*
+import io.klogging.java.LoggerFactory
+import java.util.concurrent.ConcurrentLinkedQueue
+import kotlin.reflect.KClass
+import kotlin.reflect.jvm.jvmName
+
+typealias WaltConfig = Any
+
+object ConfigManager {
+
+ val log = LoggerFac... | since the e2e tests structure is going to change, is config preloading required? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,3 @@
+#!/usr/bin/env sh
+ | not sure it should be part of the project
I think it might be a leftover, I think it was a convenience script when api was tested against postgres, but it's not referenced anywhere in the project
so maybe this can be removed? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -17,19 +14,9 @@ import io.ktor.client.request.*
import io.ktor.http.*
import io.ktor.serialization.kotlinx.json.*
import io.ktor.server.testing.*
-import kotlinx.coroutines.test.runTest
-import kotlinx.serialization.json.JsonArray
-import kotlinx.serialization.json.jsonObject
-import kotlinx.serialization.json.js... | since we're moving to a new e2e test structure, maybe this can be removed and have the e2e tests added with another pr? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -1,7 +1,6 @@
import id.walt.crypto.keys.KeyGenerationRequest
import id.walt.crypto.keys.KeyType
-import id.walt.issuer.IssuanceExamples.issuerOnboardingRequestDefaultExample
-import id.walt.issuer.IssuerOnboardingResponse
+import id.walt.issuer.issuance.IssuerOnboardingResponse
import id.walt.webwallet.db.models.... | since we're moving to a new e2e test structure, maybe this class can be removed and have the e2e tests added with another pr? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,20 @@
+{ | this looks different from klogging.conf inside the test folder
is it on purpose? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -123,17 +125,19 @@ fun Application.configureSecurity() {
defaultScopes = oidcConfig.oidcScopes
)
}
- urlProvider = { "${webConfig.publicBaseUrl}/wallet-api/auth/oidc-session" }
+ urlProvider = { "${oidcConfig.publicBaseUrl}/wallet-api/auth/oidc... | since the file was reformatted, maybe the commented code can also be cleaned up? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -441,12 +438,18 @@ class SSIKit2WalletService(
}
override suspend fun generateKey(request: KeyGenerationRequest): String = let {
- if (request.backend == "oci-rest-api" && request.config == null) {
+ if (request.config == null) {
+ ConfigManager.getConfig<KeyGenerationDefault... | maybe this commented code can be removed? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,22 @@
+package id.walt.webwallet.service
+
+import com.auth0.jwk.JwkProvider
+import com.auth0.jwk.JwkProviderBuilder
+import id.walt.webwallet.service.WalletServiceManager.oidcConfig
+import java.net.URL
+import java.util.concurrent.TimeUnit
+
+object OidcLoginService { | not sure it's a service, doesn't do anything but property initialization
maybe it can be renamed to smth. like OidcLoginService-/-Configuration or -Data |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -56,7 +56,7 @@ class VCUtil {
val policies = policies.ifEmpty { listOf("signature") }
- var requests: List<PolicyRequest> = mutableListOf()
+ val requests: ArrayList<PolicyRequest> = ArrayList() | why use an array-list?
is the doesn't list fit the purpose? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -125,7 +124,8 @@ class WaltIdDidCreateCmdTest {
@Test
fun `should fail if the key file specified in the --key option does not exist`() {
- assertFailsWith<FileNotFoundException> {
+ assertFails { | why was the change required?
the previous version of assertion is much stronger, isn't it?
also why the clarifying comment for exception type is required? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -105,7 +104,8 @@ class WaltIdVCSignCmdTest {
fun `should fail if a non existent key file is provided`() {
val invalidKeyFilePath = "foo.bar"
- val failure = assertFailsWith<FileNotFoundException> {
+ val failure = assertFails { | same as for WaltIdDidCreateCmdTest
why was the change required?
the previous version of assertion is much stronger, isn't it?
also why the clarifying comment for exception type is required? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,46 @@
+package id.walt.issuer
+
+import id.walt.commons.ServiceConfiguration
+import id.walt.commons.ServiceInitialization
+import id.walt.commons.ServiceMain
+import id.walt.did.helpers.WaltidServices
+import id.walt.commons.featureflag.FeatureManager.whenFeature
+import id.walt.issuer.entra.entraIssuance
+... | seems to have no references, maybe it can be removed?
otherwise, maybe have it renamed to `logger`? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,6 @@
+package id.walt.commons.featureflag
+
+import id.walt.commons.config.WaltConfig
+import kotlin.reflect.KClass
+
+sealed class AbstractFeature(open val name: String, open val description: String, open val configs: Map<String, KClass<out WaltConfig>>, open val dependsOn: List<AbstractFeature>) | I think this needs formatting, it's shown on a single line |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,13 @@
+package id.walt.commons.featureflag
+
+import id.walt.commons.config.WaltConfig
+import kotlin.reflect.KClass
+
+class BaseFeature(
+ override val name: String,
+ override val description: String,
+ override val configs: Map<String, KClass<out WaltConfig>>,
+) : AbstractFeature(name, descript... | this might also require formatting, shown on single line |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,20 @@
+package id.walt.commons.featureflag
+
+import id.walt.commons.config.list.WebConfig
+import id.walt.commons.web.modules.ServiceHealthChecksDebugModule
+
+object CommonsFeatureCatalog : ServiceFeatureCatalog {
+
+ val webFeature = BaseFeature("web", "Web service", WebConfig::class)
+ val featureF... | might require formatting, shown on single line |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,17 @@
+package id.walt.commons.featureflag
+
+import id.walt.commons.config.WaltConfig
+import kotlin.reflect.KClass
+
+class OptionalFeature(
+ override val name: String,
+ override val description: String,
+ override val configs: Map<String, KClass<out WaltConfig>> = emptyMap(),
+ override val ... | might require formatting, shown on single line |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,12 @@
+package id.walt.commons.logging
+
+import id.walt.commons.logging.LoggingManager
+
+object TestLoggingUtils {
+
+ fun setupTestLogging() {
+ LoggingManager.useLoggingSetup("trace") | LoggingSetup `name` seems to have more functionality than display
wouldn't it be good to have those names (trace, debug, default) defined as constants?
|
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,12 @@
+package id.walt.commons.logging
+
+import id.walt.commons.logging.LoggingManager | unused import |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,32 @@
+package id.walt.commons.logging.setups
+
+import id.walt.commons.logging.LogStringManager
+import io.klogging.Level
+import io.klogging.sending.STDERR
+import io.klogging.sending.STDOUT
+
+class DebugLoggingSetup : LoggingSetup("debug", { | maybe a constant? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,20 @@
+package id.walt.commons.logging.setups
+
+import id.walt.commons.logging.LogStringManager
+import io.klogging.Level
+import io.klogging.sending.STDERR
+import io.klogging.sending.STDOUT
+
+class DefaultLoggingSetup : LoggingSetup("default", { | maybe a constant? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,45 @@
+package id.walt.commons.logging.setups
+
+import id.walt.commons.logging.LogStringManager
+import io.klogging.Level
+import io.klogging.sending.STDERR
+import io.klogging.sending.STDOUT
+
+class TraceLoggingSetup : LoggingSetup("trace", { | maybe a constant? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,45 @@
+package id.walt.commons.logging.setups
+
+import id.walt.commons.logging.LogStringManager
+import io.klogging.Level
+import io.klogging.sending.STDERR
+import io.klogging.sending.STDOUT
+
+class TraceLoggingSetup : LoggingSetup("trace", {
+ sink("stdout", LogStringManager.selectedRenderString.rende... | shouldn't it include all databases that are supported by wallet-api? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,42 @@
+package id.walt.commons.web
+
+import id.walt.commons.config.ConfigManager
+import id.walt.commons.config.list.WebConfig
+import id.walt.commons.featureflag.CommonsFeatureCatalog
+import id.walt.commons.featureflag.FeatureManager.whenFeature
+import id.walt.commons.web.modules.FeatureFlagInformationMo... | wasn't CIO engine a problem for running requests on ebsi? I think it was replaced with okhttp |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,50 @@
+package id.walt.commons.web.modules
+
+import id.walt.commons.featureflag.FeatureManager
+import io.ktor.server.application.*
+import io.ktor.server.response.*
+import io.ktor.server.routing.*
+import kotlinx.serialization.Serializable
+
+object FeatureFlagInformationModule {
+
+ @Serializable
+ ... | linter is suggesting to replace with dictionary, as in FeatureFlagDictionary, maybe worth considering |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -1,9 +1,10 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
+import java.util.Properties
object Versions {
const val KOTLIN_VERSION = "1.9.22" // also change 2 plugins | maybe these comments can be removed? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -90,13 +92,16 @@ dependencies {
// Logging
implementation("io.github.oshai:kotlin-logging-jvm:6.0.9")
- implementation("org.slf4j:slf4j-simple:2.0.13")
+// implementation("org.slf4j:slf4j-simple:2.0.13") | probably can be removed |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -108,18 +113,18 @@ dependencies {
//implementation("com.github.ajalt.clikt:clikt:4.2.0")
// OIDC
- api(project(":waltid-openid4vc"))
+ api(project(":waltid-libraries:waltid-openid4vc"))
// SSIKit
//implementation("id.walt:waltid-ssikit:1.2309171812.0") | since this file has been updated, maybe the commented dependencies can also be removed? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,18 @@
+package id.walt.verifier
+
+import id.walt.commons.featureflag.BaseFeature
+import id.walt.commons.featureflag.OptionalFeature
+import id.walt.commons.featureflag.ServiceFeatureCatalog
+import id.walt.verifier.config.OIDCVerifierServiceConfig
+import id.walt.verifier.entra.EntraConfig
+
+object Featur... | maybe these can be private? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,49 @@
+package id.walt.verifier
+
+import id.walt.commons.ServiceConfiguration
+import id.walt.commons.ServiceInitialization
+import id.walt.commons.ServiceMain
+import id.walt.credentials.verification.PolicyManager
+import id.walt.did.dids.DidService
+import id.walt.did.dids.resolver.LocalResolver
+import i... | probably can be removed |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -0,0 +1,49 @@
+package id.walt.verifier
+
+import id.walt.commons.ServiceConfiguration
+import id.walt.commons.ServiceInitialization
+import id.walt.commons.ServiceMain
+import id.walt.credentials.verification.PolicyManager
+import id.walt.did.dids.DidService
+import id.walt.did.dids.resolver.LocalResolver
+import i... | seems to not have any reference, perhaps can be removed?
otherwise, maybe can be renamed to `logger`? |
waltid-identity | github_2023 | others | 454 | walt-id | mikeplotean | @@ -154,13 +167,16 @@ dependencies {
// Logging
implementation("io.github.oshai:kotlin-logging-jvm:6.0.9")
- implementation("org.slf4j:slf4j-simple:2.0.13")
+// implementation("org.slf4j:slf4j-simple:2.0.13") | maybe this commented dependency can be removed?
also the others from above (migration, web push, etc.) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.