File tree Expand file tree Collapse file tree
src/server/api/go/internal/middleware Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ NEXT_PUBLIC_BASE_PATH=""
44NEXT_PUBLIC_SUPABASE_URL = your-project-url
55NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY = sb_publishable_... or anon key
66
7- ACONTEXT_API_BEARER_TOKEN = your-root-api-bearer-token
7+ ACONTEXT_API_BEARER_TOKEN = AaGyw9Tl9qe4ydDh8qO0xdZNkrobQvwHWFRsnp5a3QtfbaDSDJQeRHxXPr4bGpc0g130EqBSjRNF
88ACONTEXT_PROJECT_BEARER_TOKEN_PREFIX = sk-ac-
99
1010NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY = xxx
Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ const (
7171)
7272
7373// ProjectAuth returns a middleware that authenticates requests using project bearer tokens.
74- // Token format: sk-ac-{auth_secret}.{encrypted_master_key}
75- // Derives a KEK and stores it in context for downstream encryption operations .
74+ // Token formats: compact ( sk-ac-{base64url, 76 chars}) or legacy (sk-ac-{plain_secret}).
75+ // For compact tokens, derives a KEK and stores it in context for downstream encryption.
7676// It caches project lookups in Redis to avoid hitting the database on every request.
7777func ProjectAuth (cfg * config.Config , db * gorm.DB , rdb * redis.Client ) gin.HandlerFunc {
7878 return func (c * gin.Context ) {
You can’t perform that action at this time.
0 commit comments