handler

package
v0.0.0-...-36d64fb Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: Unlicense Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JWTAuthMiddleware

func JWTAuthMiddleware(next http.Handler) http.Handler

JWTMiddleware validates a JWT token was passed by a GitHub Action and adds claims to the context

func LoggingMiddleware

func LoggingMiddleware(next http.Handler) http.Handler

Types

type GitHubClaims

type GitHubClaims struct {
	Iss                  string `json:"iss"`
	Sub                  string `json:"sub"`
	Repository           string `json:"repository"`
	RepositoryOwner      string `json:"repository_owner"`
	RepositoryVisibility string `json:"repository_visibility"`
	Actor                string `json:"actor"`
	Workflow             string `json:"workflow"`
	Ref                  string `json:"ref"`
	SHA                  string `json:"sha"`
	EventName            string `json:"event_name"`
	Exp                  int64  `json:"exp"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler() (*Handler, error)

func (*Handler) RepoAdminToken

func (h *Handler) RepoAdminToken(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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