File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
main/kotlin/com/withorb/api/services/blocking
test/kotlin/com/withorb/api/services/blocking Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,7 @@ private const val SIGNATURE_VERSION = "v1"
2525private const val SIGNATURE_DELIMITER = " "
2626private const val SIGNATURE_KEY_VALUE_DELIMITER = " ="
2727
28- class WebhookServiceImpl
29- constructor (
30- private val clientOptions: ClientOptions ,
31- ) : WebhookService {
28+ class WebhookServiceImpl constructor(private val clientOptions : ClientOptions ) : WebhookService {
3229 @kotlin.ExperimentalStdlibApi
3330 override fun unwrap (payload : String , headers : Headers , secret : String? ): JsonValue {
3431 verifySignature(payload, headers, secret)
@@ -86,7 +83,7 @@ constructor(
8683 if (
8784 MessageDigest .isEqual(
8885 actualSignature,
89- expectedSignature.toByteArray(Charsets .UTF_8 )
86+ expectedSignature.toByteArray(Charsets .UTF_8 ),
9087 )
9188 ) {
9289 return
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ internal class WebhookServiceTest {
7575 .atOffset(ZoneOffset .UTC )
7676 .format(DateTimeFormatter .ISO_LOCAL_DATE_TIME )
7777 ),
78- SECRET
78+ SECRET ,
7979 )
8080 }
8181 .isInstanceOf(OrbException ::class .java)
@@ -97,7 +97,7 @@ internal class WebhookServiceTest {
9797 .atOffset(ZoneOffset .UTC )
9898 .format(DateTimeFormatter .ISO_LOCAL_DATE_TIME )
9999 ),
100- SECRET
100+ SECRET ,
101101 )
102102 }
103103 .isInstanceOf(OrbException ::class .java)
@@ -131,7 +131,7 @@ internal class WebhookServiceTest {
131131 .verifySignature(
132132 PAYLOAD .trimIndent(),
133133 buildHeaders(signature = " $SIGNATURE v1=Zm9v" ),
134- SECRET
134+ SECRET ,
135135 )
136136 }
137137 .doesNotThrowAnyException()
@@ -141,7 +141,7 @@ internal class WebhookServiceTest {
141141 .verifySignature(
142142 PAYLOAD .trimIndent(),
143143 buildHeaders(signature = " v1=$SIGNATURE v2=$SIGNATURE " ),
144- SECRET
144+ SECRET ,
145145 )
146146 }
147147 .doesNotThrowAnyException()
@@ -156,7 +156,7 @@ internal class WebhookServiceTest {
156156 .verifySignature(
157157 PAYLOAD .trimIndent(),
158158 buildHeaders(signature = " v2=$SIGNATURE " ),
159- SECRET
159+ SECRET ,
160160 )
161161 }
162162 .isInstanceOf(OrbException ::class .java)
You can’t perform that action at this time.
0 commit comments