Skip to content

Commit

Permalink
JwsSignatureScheme fallback kid
Browse files Browse the repository at this point in the history
  • Loading branch information
waltkb committed Nov 22, 2023
1 parent ac999a3 commit 429e4c3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ class JwsSignatureScheme : SignatureScheme {
suspend fun verify(data: String): Result<JsonObject> = runCatching {
val jws = data.decodeJws()

val header = jws.header
val payload = jws.payload

val issuerDid = payload[JwsOption.ISSUER]!!.jsonPrimitive.content
val issuerDid = (payload[JwsOption.ISSUER] ?: header[JwsHeader.KEY_ID])!!.jsonPrimitive.content

// val subjectDid = payload["sub"]!!.jsonPrimitive.content
// println("Issuer: $issuerDid")
// println("Subject: $subjectDid")
Expand Down

0 comments on commit 429e4c3

Please sign in to comment.