auth

package
v0.0.0-...-c530903 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 8 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSignedJwtToken

func GetSignedJwtToken(appID string, privateKey string) (string, error)

GetSignedJwtToken get a tokens signed with private key

func IsCustomer

func IsCustomer(ownerLogin string, c *http.Client) (bool, error)

IsCustomer returns true if a customer is listed in the customers file. The validation is controlled by the 'validate_customers' env-var

func MakeAccessTokenForInstallation

func MakeAccessTokenForInstallation(appID string, installation int, privateKey string) (string, error)

MakeAccessTokenForInstallation makes an access token for an installation / private key

Types

type JWTAuth

type JWTAuth struct {
	Token     string    `json:"token"`
	ExpiresAt time.Time `json:"expires_at"`
}

JWTAuth token issued by Github in response to signed JWT Token

Jump to

Keyboard shortcuts

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