clerk

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package clerk provides convenience wiring around the Clerk auth middleware.

The package aliases the underlying middleware types and exposes environment loading helpers for quick application bootstrap. Import the middleware package directly when you need the narrowest dependency surface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthChecker

func HealthChecker(cfg Config, client *http.Client) ports.HealthChecker

HealthChecker returns a health checker for Clerk.

func WithSubject

func WithSubject(ctx context.Context, subj Subject) context.Context

WithSubject stores the authenticated subject in context.

Types

type Config

type Config = clerk.Config

Config aliases the Clerk middleware configuration.

func LoadConfig

func LoadConfig(loader *config.Loader) Config

LoadConfig reads Clerk configuration from environment.

type Middleware

type Middleware = clerk.Middleware

Middleware aliases the Clerk JWT middleware.

func NewMiddleware

func NewMiddleware(ctx context.Context, cfg Config, log ports.Logger) (*Middleware, error)

NewMiddleware creates a Clerk JWT middleware.

type Subject

type Subject = clerk.Subject

Subject aliases the Clerk subject payload.

func SubjectFromContext

func SubjectFromContext(ctx context.Context) (Subject, bool)

SubjectFromContext retrieves the subject from context.

Jump to

Keyboard shortcuts

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