Skip to content

Commit

Permalink
Add blurb to README.md on signer customization.
Browse files Browse the repository at this point in the history
  • Loading branch information
wlynch committed Apr 7, 2023
1 parent 8121e40 commit b3e558f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,26 @@ WebHook request
}
```

# Customizing signing behavior

Users can customize signing behavior by passing in a
[Signer](https://pkg.go.dev/github.com/bradleyfalzon/ghinstallation/v2#Signer)
implementation when creating an
[AppsTransport](https://pkg.go.dev/github.com/bradleyfalzon/ghinstallation/v2#AppsTransport).
For example, this can be used to create tokens backed by keys in a KMS system.

```go
signer := &myCustomSigner{
key: "https://url/to/key/vault",
}
atr := NewAppsTransportWithOptions(http.DefaultTransport, 1, WithSigner(signer))
tr := NewFromAppsTransport(atr, 99)
```

# License

[Apache 2.0](LICENSE)

# Dependencies

- [github.com/golang-jwt/jwt-go](https://github.com/golang-jwt/jwt-go)
- [github.com/golang-jwt/jwt-go](https://github.com/golang-jwt/jwt-go)

0 comments on commit b3e558f

Please sign in to comment.