Skip to content

Fix middleware#20

Open
imhben wants to merge 13 commits intomainfrom
fix-middleware
Open

Fix middleware#20
imhben wants to merge 13 commits intomainfrom
fix-middleware

Conversation

@imhben
Copy link
Member

@imhben imhben commented Mar 11, 2026

Added Middleware Tests (can be tested with go run ./api/middleware)

Added Docs to NewConfigFromEnv

Made Skip Auth functional

dx-gov and others added 11 commits March 4, 2026 11:09
Introduce SkipAuthMiddleware to inject a stable local identity for local development when SKIP_AUTH is enabled. Middleware supports optional override headers (x-skip-auth-sub, x-skip-auth-username, x-skip-auth-scope, x-skip-auth-groups) and includes parseGroups helper to handle comma-separated groups. Wire the middleware into api/app.go (fixing the previous inverted SKIP_AUTH logic) and add unit tests covering default identity and header overrides. Also update docs/setup.md to document SKIP_AUTH usage and expand NewConfigFromEnv doc comment to list supported environment keys.
@imhben imhben requested a review from dx-gov March 11, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants