mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-25 23:58:15 +08:00
13 lines
370 B
Python
13 lines
370 B
Python
from services.auth.firecrawl import FirecrawlAuth
|
|
|
|
|
|
class ApiKeyAuthFactory:
|
|
def __init__(self, provider: str, credentials: dict):
|
|
if provider == "firecrawl":
|
|
self.auth = FirecrawlAuth(credentials)
|
|
else:
|
|
raise ValueError("Invalid provider")
|
|
|
|
def validate_credentials(self):
|
|
return self.auth.validate_credentials()
|