Skip to content

Commit

Permalink
docs: update verifyRequestByKeyId example
Browse files Browse the repository at this point in the history
  • Loading branch information
francisfuzz committed Sep 16, 2024
1 parent 7a740cc commit 6322126
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ We consider this SDK alpha software in terms of API stability, but we adhere to
```js
import { verifyRequestByKeyId } from "@copilot-extensions/preview-sdk";

const payloadIsVerified = await verifyRequestByKeyId(
const { isValid, cache } = await verifyRequestByKeyId(
request.body,
signature,
keyId,
{
token: process.env.GITHUB_TOKEN,
},
);
// true or false
// isValid: true or false
// cache: { id, keys }
```

### Build a response
Expand Down

0 comments on commit 6322126

Please sign in to comment.