Closed bakar-io closed 2 months ago
@andrewnguonly Fundamentally, handler takes a request and returns a User:
class AuthHandler(ABC):
@abstractmethod
async def __call__(self, request: Request) -> User:
"""Auth handler that returns a user object or raises an HTTPException."""
So, we are not limited by JWT auth. We're free to implement any auth mechanism in the future.
Introduces auth into OpenGPTs as the first step, before integrating permissions.
Allows users to get started with the project quickly after cloning the repo (via
NOOPAuth
auth handler), as well as enabling production use-cases viaJWTAuthLocal
andJWTAuthOIDC
.auth.md documents the usage of JWT auth in detail.