Versions in this module Expand all Collapse all v1 v1.0.0 Mar 6, 2026 Changes in this version + var AnonymousUser = &User + func AuthMiddleware(auth Authenticator) func(http.Handler) http.Handler + func ContextWithUser(ctx context.Context, user *User) context.Context + type Authenticator interface + Authenticate func(r *http.Request) (*User, error) + type Authorizer interface + CanAccessRepo func(ctx context.Context, user *User, repoName string) bool + FilterRepos func(ctx context.Context, user *User, repos []string) []string + type NoOpAuthenticator struct + func (n *NoOpAuthenticator) Authenticate(_ *http.Request) (*User, error) + type NoOpAuthorizer struct + func (n *NoOpAuthorizer) CanAccessRepo(_ context.Context, _ *User, _ string) bool + func (n *NoOpAuthorizer) FilterRepos(_ context.Context, _ *User, repos []string) []string + type User struct + Email string + Groups []string + ID string + Name string + Provider string + func UserFromContext(ctx context.Context) *User