auth

package
v0.0.0-...-8720c9f Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TeamContextKey   string = "team"
	UserIDContextKey string = "user_id"
)

Variables

View Source
var (
	ErrNoAuthHeader      = &AuthorizationHeaderMissingError{}
	ErrInvalidAuthHeader = errors.New("authorization header is malformed")
)

Functions

func CreateAuthenticationFunc

func CreateAuthenticationFunc(
	config cfg.Config,
	teamValidationFunction func(ctx context.Context, ginCtx *gin.Context, token string) (*types.Team, *api.APIError),
	userValidationFunction func(ctx context.Context, ginCtx *gin.Context, token string) (uuid.UUID, *api.APIError),
	supabaseTokenValidationFunction func(ctx context.Context, ginCtx *gin.Context, token string) (uuid.UUID, *api.APIError),
	supabaseTeamValidationFunction func(ctx context.Context, ginCtx *gin.Context, token string) (*types.Team, *api.APIError),
) openapi3filter.AuthenticationFunc

Types

type AuthorizationHeaderMissingError

type AuthorizationHeaderMissingError struct{}

func (*AuthorizationHeaderMissingError) Error

Jump to

Keyboard shortcuts

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