Documentation
¶
Index ¶
- func ApiKeyAuthentication() func(next http.Handler) http.Handler
- func BearerAuth(r *http.Request) (token string, ok bool)
- func GitHubOIDC(ctx context.Context, log logrus.FieldLogger) func(next http.Handler) http.Handler
- func InsecureUserHeader() func(next http.Handler) http.Handler
- func JWTAuthentication(ctx context.Context, issuer, audience, zitadelOrgID string, ...) (func(next http.Handler) http.Handler, error)
- func Oauth2Authentication(authHandler authn.Handler) func(next http.Handler) http.Handler
- func PreSharedKeyAuthentication(preSharedKey string) func(next http.Handler) http.Handler
- func RequireAuthenticatedUser() func(next http.Handler) http.Handler
- type GitHubRepoActor
- func (g *GitHubRepoActor) GCPTeamGroups(ctx context.Context) ([]string, error)
- func (g *GitHubRepoActor) GetID() uuid.UUID
- func (g *GitHubRepoActor) Identity() string
- func (g *GitHubRepoActor) IsAdmin() bool
- func (g *GitHubRepoActor) IsGitHubActions()
- func (g *GitHubRepoActor) IsServiceAccount() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiKeyAuthentication ¶
ApiKeyAuthentication will authenticate a service account from a token found in the authorization header
func BearerAuth ¶
BearerAuth returns the token provided in the request's Authorization header, if the request uses the Bearer authentication scheme.
func GitHubOIDC ¶
func InsecureUserHeader ¶
InsecureUserHeader returns a middleware that sets the email address of the authenticated user from the x-user-email header. This middleware is intended for local development and testing purposes only.
func JWTAuthentication ¶
func Oauth2Authentication ¶
Oauth2Authentication If the request has a session cookie, look up the session from the store, and if it exists, try to load the user with the email address stored in the session.
func PreSharedKeyAuthentication ¶
PreSharedKeyAuthentication will authenticate a request against a pre shared key
Types ¶
type GitHubRepoActor ¶
func (*GitHubRepoActor) GCPTeamGroups ¶
func (g *GitHubRepoActor) GCPTeamGroups(ctx context.Context) ([]string, error)
func (*GitHubRepoActor) GetID ¶
func (g *GitHubRepoActor) GetID() uuid.UUID
func (*GitHubRepoActor) Identity ¶
func (g *GitHubRepoActor) Identity() string
func (*GitHubRepoActor) IsAdmin ¶
func (g *GitHubRepoActor) IsAdmin() bool
func (*GitHubRepoActor) IsGitHubActions ¶
func (g *GitHubRepoActor) IsGitHubActions()
func (*GitHubRepoActor) IsServiceAccount ¶
func (g *GitHubRepoActor) IsServiceAccount() bool