Help us shape the future of Go! Take the 2026 Go Developer Survey

githubapp

package
v1.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package githubapp signs JSON Web Tokens for the Devsy GitHub App and loads the app's RSA private key. The hack/ tools that authenticate as the app share this code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWT

func GenerateJWT(clientID string, key *rsa.PrivateKey, now time.Time) (string, error)

GenerateJWT returns an RS256-signed JWT for the GitHub App with the given client ID. iat is backdated by issuedAtSkew and exp is maxExpiration after now.

func LoadPrivateKey

func LoadPrivateKey(path, contents string) (*rsa.PrivateKey, error)

LoadPrivateKey parses the app's PEM private key. contents takes precedence over path; path is read from disk only when contents is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL