dataflow.auth.supabase¶
Attributes¶
Classes¶
Authentication provider using Supabase JWT. |
Functions¶
Get the auth instance for dependency injection. |
|
|
Verify the token and return the user ID. |
|
Require authentication for a route. |
Module Contents¶
- class dataflow.auth.supabase.SupabaseAuth(server_config: haive.dataflow.auth.config.environment.SupabaseServerConfig | None = None)¶
Authentication provider using Supabase JWT.
- Parameters:
server_config (haive.dataflow.auth.config.environment.SupabaseServerConfig | None)
- verify_token(token: str) dict[str, Any] | None ¶
Verify Supabase JWT token and return payload if valid.
- config¶
- dataflow.auth.supabase.get_auth_instance()¶
Get the auth instance for dependency injection.
- async dataflow.auth.supabase.get_current_user(credentials: fastapi.security.HTTPAuthorizationCredentials | None = Depends(security), auth: SupabaseAuth = Depends(get_auth_instance)) str | None ¶
Verify the token and return the user ID.
This is for frontend API routes - can be used with FastAPI Depends.
- Parameters:
credentials (fastapi.security.HTTPAuthorizationCredentials | None)
auth (SupabaseAuth)
- Return type:
str | None
- async dataflow.auth.supabase.require_auth(user_id: str | None = Depends(get_current_user)) str ¶
Require authentication for a route.
Raises HTTPException if not authenticated.
- dataflow.auth.supabase.logger¶
- dataflow.auth.supabase.security¶