Skip to content

Commit

Permalink
Update README usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie committed Oct 30, 2023
1 parent 4ac463d commit 0b19f50
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ const client = createClient()

// Connect to a specific endpoint
const client = createClient('unix:///path/to/endpoint.sock')

// Read x509 credentials from Workload API
const rpc = client.fetchX509SVID()
for await (const message of rpc.responses) {
message.svids.forEach((svid) => {
const certificateBase64 = Buffer.from(svid.x509Svid).toString('base64')
console.log('Certificate in Base64 Format:', certificateBase64)
})

if (messages.svids.length > 0) {
break
}
}
```

## License
Expand Down

0 comments on commit 0b19f50

Please sign in to comment.