Skip to content

Commit

Permalink
Update 4-webhooks.mdx
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Hilker <[email protected]>
  • Loading branch information
patrickhilker authored Oct 12, 2024
1 parent f739dd4 commit c93c0e6
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,7 @@ Um die Signatur zu prüfen, kann eine übliche kryptographische Library in der g

<Tabs>
<TabItem value="go" label="Go">

````go
```go
bodyBytes, err := io.ReadAll(body)
if err != nil {
return err
Expand All @@ -553,11 +552,9 @@ if err != nil {
if !ed25519.Verify(publicKey, bodyBytes, signature) {
panic("invalid signature")
}
```

```
</TabItem>
<TabItem value="php" label="PHP">

```php
$req = new ExtensionGetPublicKeyRequest($serial);
$resp = $apiClient->marketplace()->extensionGetPublicKey($req);
Expand All @@ -572,8 +569,7 @@ $valid = sodium_crypto_sign_verify_detached(
if (!$valid) {
throw new \Exception('invalid request signature');
}
````
```
</TabItem>
</Tabs>

Expand Down

0 comments on commit c93c0e6

Please sign in to comment.