pub async fn auth( __arg0: State<AppState>, request: Request, next: Next, ) -> Result<Response, ApiError>
Authentication middleware for protected routes
This middleware validates authentication creds.