mirror of
https://github.com/kennethreitz/responder.git
synced 2026-07-21 18:39:29 +00:00
e0717e32ba
- responder.ext.auth: BearerAuth/BasicAuth/APIKeyAuth schemes usable as dependencies (inject the principal) or called directly; sync/async verify, constant-time static-secret paths, correct 401 + WWW-Authenticate. - OpenAPI security: api.add_security_scheme()/scheme.register(api) populate components.securitySchemes (Swagger Authorize button); security= on routes/ verb decorators marks per-op requirements; default=True requires globally. - API(security_headers=True) + responder.middleware.SecurityHeadersMiddleware: opt-in nosniff/X-Frame-Options/Referrer-Policy (+ optional CSP/Permissions), preserving handler-set headers. - DI: callable instances with async __call__ are now awaited (not run in a thread), which is what lets an auth scheme object be a dependency. Backwards-compatible. 490 tests pass; ruff + mypy clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>