leaguemanager.services.account.oauth_account¶
Module Contents¶
Classes¶
Handles user OAuth account operations. |
|
Data¶
API¶
- leaguemanager.services.account.oauth_account.__all__¶
[‘UserOAuthAccountService’, ‘UserOauthAccountAsyncService’]
- leaguemanager.services.account.oauth_account.settings¶
‘get_settings(…)’
- class leaguemanager.services.account.oauth_account.UserOAuthAccountService¶
Bases:
leaguemanager.services.base.SQLAlchemySyncRepositoryServiceHandles user OAuth account operations.
- class Repo¶
Bases:
advanced_alchemy.repository.SQLAlchemySyncRepository[leaguemanager.models.UserOauthAccount]User OAuth account repository.
- model_type¶
None
- repository_type¶
None
- class leaguemanager.services.account.oauth_account.UserOauthAccountAsyncService¶
Bases:
leaguemanager.services.base.SQLAlchemyAsyncRepositoryService- class Repo¶
Bases:
advanced_alchemy.repository.SQLAlchemyAsyncRepository[leaguemanager.models.UserOauthAccount]- model_type¶
None
- repository_type¶
None
- async to_model_on_create(data: advanced_alchemy.service.ModelDictT[leaguemanager.models.User]) advanced_alchemy.service.ModelDictT[leaguemanager.models.User]¶
- async to_model_on_update(data: advanced_alchemy.service.ModelDictT[leaguemanager.models.User]) advanced_alchemy.service.ModelDictT[leaguemanager.models.User]¶
- async to_model_on_upsert(data: advanced_alchemy.service.ModelDictT[leaguemanager.models.User]) advanced_alchemy.service.ModelDictT[leaguemanager.models.User]¶
- async _populate_model(data: advanced_alchemy.service.ModelDictT[leaguemanager.models.User]) advanced_alchemy.service.ModelDictT[leaguemanager.models.User]¶
- async _populate_with_hashed_password(data: advanced_alchemy.service.ModelDictT[leaguemanager.models.User]) advanced_alchemy.service.ModelDictT[leaguemanager.models.User]¶
- async _populate_with_role(data: advanced_alchemy.service.ModelDictT[leaguemanager.models.User]) advanced_alchemy.service.ModelDictT[leaguemanager.models.User]¶
- async create_or_update_oauth_account(user_id: uuid.UUID, provider: str, oauth_data: dict[str, Any], token_data: httpx_oauth.oauth2.OAuth2Token) leaguemanager.models.UserOauthAccount¶
Create or update OAuth account with token data.
- async find_user_by_oauth_account(provider: str, oauth_id: str) leaguemanager.models.User | None¶
Find user by OAuth provider and ID.
- async link_oauth_account(user_id: uuid.UUID, provider: str, oauth_data: dict[str, Any], token_data: httpx_oauth.oauth2.OAuth2Token) leaguemanager.models.UserOauthAccount¶
Link OAuth account to existing user.
- async unlink_oauth_account(user_id: uuid.UUID, provider: str) bool¶
Unlink OAuth account from user.
- async get_user_oauth_accounts(user_id: uuid.UUID) list[leaguemanager.models.UserOauthAccount]¶
Get all OAuth accounts for a user.