-
Notifications
You must be signed in to change notification settings - Fork 53
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 #780 from walt-id/wal-203-verification-policies-fo…
…r-non-w3c Wal 203 verification policies for non w3c
- Loading branch information
Showing
81 changed files
with
715 additions
and
349 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
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
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
10 changes: 5 additions & 5 deletions
10
...lications/waltid-cli/src/jvmTest/kotlin/id/walt/cli/verifiers/ExpirationDatePolicyTest.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
18 changes: 18 additions & 0 deletions
18
...waltid-verifiable-credentials/src/commonMain/kotlin/id/walt/credentials/utils/VCFormat.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,18 @@ | ||
package id.walt.credentials.utils | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
enum class VCFormat(val value: String) { | ||
jwt("jwt"), | ||
jwt_vc("jwt_vc"), | ||
jwt_vp("jwt_vp"), | ||
ldp_vc("ldp_vc"), | ||
ldp_vp("ldp_vp"), | ||
ldp("ldp"), | ||
jwt_vc_json("jwt_vc_json"), | ||
jwt_vp_json("jwt_vp_json"), | ||
mso_mdoc("mso_mdoc"), | ||
@SerialName("vc+sd-jwt") sd_jwt_vc("vc+sd-jwt") | ||
} |
13 changes: 0 additions & 13 deletions
13
...ntials/src/jsMain/kotlin/id/walt/credentials/verification/policies/RevocationPolicy.js.kt
This file was deleted.
Oops, something went wrong.
89 changes: 0 additions & 89 deletions
89
...ials/src/jvmMain/kotlin/id/walt/credentials/verification/policies/RevocationPolicy.jvm.kt
This file was deleted.
Oops, something went wrong.
110 changes: 110 additions & 0 deletions
110
waltid-libraries/credentials/waltid-verification-policies/build.gradle.kts
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,110 @@ | ||
import love.forte.plugin.suspendtrans.ClassInfo | ||
import love.forte.plugin.suspendtrans.SuspendTransformConfiguration | ||
import love.forte.plugin.suspendtrans.TargetPlatform | ||
import love.forte.plugin.suspendtrans.gradle.SuspendTransPluginConstants | ||
import love.forte.plugin.suspendtrans.gradle.SuspendTransformGradleExtension | ||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
|
||
plugins { | ||
kotlin("multiplatform") | ||
kotlin("plugin.serialization") | ||
id("maven-publish") | ||
id("dev.petuska.npm.publish") version "3.4.3" | ||
id("love.forte.plugin.suspend-transform") version "2.0.20-0.9.2" | ||
id("com.github.ben-manes.versions") | ||
} | ||
|
||
group = "id.walt.policies" | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
suspendTransform { | ||
enabled = true | ||
includeRuntime = true | ||
useDefault() | ||
|
||
includeAnnotation = false // Required in the current version to avoid "compileOnly" warning | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(17) | ||
|
||
jvm { | ||
@OptIn(ExperimentalKotlinGradlePluginApi::class) | ||
compilerOptions { | ||
jvmTarget = JvmTarget.JVM_17 | ||
} | ||
withJava() | ||
tasks.withType<Test>().configureEach { | ||
useJUnitPlatform() | ||
} | ||
} | ||
|
||
js(IR) { | ||
moduleName = "verification-policies" | ||
nodejs { | ||
generateTypeScriptDefinitions() | ||
} | ||
binaries.library() | ||
} | ||
val ktor_version = "2.3.12" | ||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
implementation("com.eygraber:jsonpathkt-kotlinx:3.0.2") | ||
// JSON | ||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1") | ||
implementation("io.github.optimumcode:json-schema-validator:0.2.2") | ||
|
||
implementation(project(":waltid-libraries:credentials:waltid-verifiable-credentials")) | ||
implementation(project(":waltid-libraries:sdjwt:waltid-sdjwt")) | ||
|
||
// Kotlinx | ||
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0") | ||
|
||
// Ktor client | ||
implementation("io.ktor:ktor-client-core:$ktor_version") | ||
implementation("io.ktor:ktor-client-serialization:$ktor_version") | ||
implementation("io.ktor:ktor-client-content-negotiation:$ktor_version") | ||
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktor_version") | ||
implementation("io.ktor:ktor-client-json:$ktor_version") | ||
implementation("io.ktor:ktor-client-logging:$ktor_version") | ||
|
||
// Loggin | ||
implementation("io.github.oshai:kotlin-logging:7.0.0") | ||
|
||
// Coroutines | ||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1") | ||
|
||
// suspend-transform plugin annotations (required in the current version to avoid "compileOnly" warning) | ||
implementation("${SuspendTransPluginConstants.ANNOTATION_GROUP}:${SuspendTransPluginConstants.ANNOTATION_NAME}:${SuspendTransPluginConstants.ANNOTATION_VERSION}") | ||
} | ||
} | ||
val commonTest by getting { | ||
dependencies { | ||
implementation(kotlin("test")) | ||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.1") | ||
} | ||
} | ||
val jvmTest by getting { | ||
dependencies { | ||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1") | ||
implementation("org.slf4j:slf4j-simple:2.0.13") | ||
implementation("org.junit.jupiter:junit-jupiter-params:5.11.0-M2") | ||
} | ||
} | ||
} | ||
} | ||
|
||
extensions.getByType<SuspendTransformGradleExtension>().apply { | ||
transformers[TargetPlatform.JS] = mutableListOf( | ||
SuspendTransformConfiguration.jsPromiseTransformer.copy( | ||
copyAnnotationExcludes = listOf( | ||
ClassInfo("kotlin.js", "JsExport.Ignore") | ||
) | ||
) | ||
) | ||
} |
2 changes: 1 addition & 1 deletion
2
...fication/CredentialDataValidatorPolicy.kt → ...policies/CredentialDataValidatorPolicy.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
2 changes: 1 addition & 1 deletion
2
...ation/CredentialWrapperValidatorPolicy.kt → ...icies/CredentialWrapperValidatorPolicy.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
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
Oops, something went wrong.