Skip to content

Commit

Permalink
chore: Base64.UrlSafe.decode
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderPostma committed Nov 5, 2024
1 parent 40e6ff4 commit 233a5b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ fun decodeJWTComponents(jwtToken: String): JWT {
throw InvalidJwtException("Invalid JWT format: Expected 3 parts, found ${parts.size}")
}

val headerJson = Base64.decode(parts[0]).decodeToString()
val payloadJson = Base64.decode(parts[1]).decodeToString()
val headerJson = Base64.UrlSafe.decode(parts[0]).decodeToString()
val payloadJson = Base64.UrlSafe.decode(parts[1]).decodeToString()

return try {
JWT(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class DefaultTrustChainImpl(
if (result != null) return result
chain.removeLast()
}
} catch (_: Exception) {
} catch (_: Exception) { // TODO distinguish between remote HTTP errors and internal errors
return null
}

Expand Down

0 comments on commit 233a5b4

Please sign in to comment.