mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
* feat: support oauth2 config for authentication * refactor: improve OAuth2 settings management The CLI now supports seamless integration with other authentication providers, since the client_id, issue, domain are now manage by the user * feat: support okta Device Authorization flow * chore: resolve linter issues * test: fix tests * test: adding tests for auth providers * test: fix broken test * refator: adding WorkOS paramenters as default settings auth * chore: improve oauth2 attributes description * refactor: simplify WorkOS getting values * fix: ensure Auth0 parameters is set when overrinding default auth provider * chore: remove TODO Auth0 no longer provides default values --------- Co-authored-by: Heitor Carvalho <heitor.scz@gmail.com>
31 lines
616 B
Python
31 lines
616 B
Python
from abc import ABC, abstractmethod
|
|
from crewai.cli.authentication.main import Oauth2Settings
|
|
|
|
class BaseProvider(ABC):
|
|
def __init__(self, settings: Oauth2Settings):
|
|
self.settings = settings
|
|
|
|
@abstractmethod
|
|
def get_authorize_url(self) -> str:
|
|
...
|
|
|
|
@abstractmethod
|
|
def get_token_url(self) -> str:
|
|
...
|
|
|
|
@abstractmethod
|
|
def get_jwks_url(self) -> str:
|
|
...
|
|
|
|
@abstractmethod
|
|
def get_issuer(self) -> str:
|
|
...
|
|
|
|
@abstractmethod
|
|
def get_audience(self) -> str:
|
|
...
|
|
|
|
@abstractmethod
|
|
def get_client_id(self) -> str:
|
|
...
|