🎉 svc-infra v1.0 is here — Production-ready backend infrastructure
What's new
nfrax logonfrax

Infrastructure that just works. Ship products, not boilerplate.

Frameworks

  • svc-infra
  • ai-infra
  • fin-infra
  • robo-infra

Resources

  • Getting Started
  • What's New
  • Contributing

Community

  • GitHub

© 2026 nfrax. All rights reserved.

nfrax logonfrax
Start HereWhat's New
GitHub
svc-infra / API Reference

AuthPolicy

from svc_infra.api.fastapi.auth.policy import AuthPolicy
View source
svc_infra.api.fastapi.auth.policy
Extends:Protocol

Protocol defining authentication policy interface. Implement this protocol to customize authentication behavior including MFA requirements, login hooks, and challenge handling.

Methods

On This Page

on_login_successasyncon_mfa_challengeasyncshould_require_mfaasync