Skip to content

Commit 2137913

Browse files
TomerAberbachstainless-app[bot]
authored andcommitted
fix: compilation error
1 parent 2c99b03 commit 2137913

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/WebhookServiceImpl.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import java.time.ZoneOffset
1616
import java.util.*
1717
import javax.crypto.Mac
1818
import javax.crypto.spec.SecretKeySpec
19+
import kotlin.jvm.optionals.getOrNull
1920

2021
private const val SIGNATURE_HEADER = "X-Orb-Signature"
2122
private const val TIMESTAMP_HEADER = "X-Orb-Timestamp"
@@ -40,7 +41,7 @@ class WebhookServiceImpl constructor(private val clientOptions: ClientOptions) :
4041
override fun verifySignature(payload: String, headers: Headers, secret: String?) {
4142
val webhookSecret =
4243
secret
43-
?: clientOptions.webhookSecret
44+
?: clientOptions.webhookSecret().getOrNull()
4445
?: throw OrbException(
4546
"The webhook secret must either be set using the env var, ORB_WEBHOOK_SECRET, on the client class, or passed to this method"
4647
)

0 commit comments

Comments
 (0)