You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Provide easy alternative to create App JWT token (#2937)
* Provide easy alternative to create App JWT token
* Make it clear that its the key content
* Commit suggested changes by @kfcampbell
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
* Add a reminder regarding the required using statements
---------
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
Copy file name to clipboardExpand all lines: docs/github-apps.md
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,43 @@ That concludes the walkthrough!
100
100
### A Note on JWT Tokens
101
101
Octokit.net aims to have no external dependencies, therefore we do not currently have the ability to generate/sign JWT tokens for you, and instead expect that you will pass in the appropriately signed JWT token required to authenticate the `GitHubApp`.
102
102
103
-
Luckily one of our contributors [@adriangodong](https://github.com/adriangodong) has created a library `GitHubJwt` ( [GitHub](https://github.com/adriangodong/githubjwt) | [NuGet](https://www.nuget.org/packages/githubjwt) ) which you can use as per the following example.
103
+
In order to create the token, you can create it manually using the following snippet.
104
+
105
+
```csharp
106
+
// Have these using statements in your file
107
+
// using System.IdentityModel.Tokens.Jwt
108
+
// using System.Security.Claims
109
+
// using System.Security.Cryptography
110
+
111
+
varrsaPrivateKey="-----BEGIN R..."; // The RSA private key content itself, read from e.g. a file
Alternatively, one of our contributors [@adriangodong](https://github.com/adriangodong) has created a library `GitHubJwt` ([GitHub](https://github.com/adriangodong/githubjwt) | [NuGet](https://www.nuget.org/packages/githubjwt)) which you can use as per the following example.
104
140
105
141
```csharp
106
142
// Use GitHubJwt library to create the GitHubApp Jwt Token using our private certificate PEM file
0 commit comments