findmy.reports.twofactor#
Public classes related to handling two-factor authentication.
Classes#
Base class for a second-factor authentication method for an Apple account. |
|
An asynchronous implementation of a second-factor authentication method. |
|
A synchronous implementation of a second-factor authentication method. |
|
Base class for SMS-based two-factor authentication. |
|
Base class for trusted device-based two-factor authentication. |
|
An async implementation of |
|
A sync implementation of |
|
An async implementation of |
|
A sync implementation of |
Module Contents#
- class findmy.reports.twofactor.BaseSecondFactorMethod(account: _AccType)#
Bases:
abc.ABC
,Generic
[_AccType
]Base class for a second-factor authentication method for an Apple account.
- property account: _AccType#
The account associated with the second-factor method.
- abstractmethod request() findmy.util.types.MaybeCoro[None] #
Put in a request for the second-factor challenge.
Exact meaning is up to the implementing class.
- abstractmethod submit(code: str) findmy.util.types.MaybeCoro[findmy.reports.state.LoginState] #
Submit a code to complete the second-factor challenge.
- class findmy.reports.twofactor.AsyncSecondFactorMethod(account: findmy.reports.account.AsyncAppleAccount)#
Bases:
BaseSecondFactorMethod
,abc.ABC
An asynchronous implementation of a second-factor authentication method.
Intended as a base class for actual implementations to inherit from.
- property account: findmy.reports.account.AsyncAppleAccount#
The account associated with the second-factor method.
- abstractmethod request() None #
- Async:
- abstractmethod submit(code: str) findmy.reports.state.LoginState #
- Async:
- class findmy.reports.twofactor.SyncSecondFactorMethod(account: findmy.reports.account.AppleAccount)#
Bases:
BaseSecondFactorMethod
,abc.ABC
A synchronous implementation of a second-factor authentication method.
Intended as a base class for actual implementations to inherit from.
- property account: findmy.reports.account.AppleAccount#
The account associated with the second-factor method.
- abstractmethod request() None #
- abstractmethod submit(code: str) findmy.reports.state.LoginState #
- class findmy.reports.twofactor.SmsSecondFactorMethod(account: _AccType)#
Bases:
BaseSecondFactorMethod
,abc.ABC
Base class for SMS-based two-factor authentication.
- property phone_number_id: int#
- Abstractmethod:
The phone number’s ID. You most likely don’t need this.
- property phone_number: str#
- Abstractmethod:
The 2FA method’s phone number.
May be masked using unicode characters; should only be used for identification purposes.
- class findmy.reports.twofactor.TrustedDeviceSecondFactorMethod(account: _AccType)#
Bases:
BaseSecondFactorMethod
,abc.ABC
Base class for trusted device-based two-factor authentication.
- class findmy.reports.twofactor.AsyncSmsSecondFactor(account: findmy.reports.account.AsyncAppleAccount, number_id: int, phone_number: str)#
Bases:
AsyncSecondFactorMethod
,SmsSecondFactorMethod
An async implementation of
SmsSecondFactorMethod()
.- property phone_number_id: int#
The phone number’s ID. You most likely don’t need this.
- property phone_number: str#
The 2FA method’s phone number.
May be masked using unicode characters; should only be used for identification purposes.
- async request() None #
Request an SMS to the corresponding phone number containing a 2FA code.
- async submit(code: str) findmy.reports.state.LoginState #
Submit the 2FA code as received over SMS.
- class findmy.reports.twofactor.SyncSmsSecondFactor(account: findmy.reports.account.AppleAccount, number_id: int, phone_number: str)#
Bases:
SyncSecondFactorMethod
,SmsSecondFactorMethod
A sync implementation of
SmsSecondFactorMethod()
.- property phone_number_id: int#
- property phone_number: str#
- request() None #
- submit(code: str) findmy.reports.state.LoginState #
- class findmy.reports.twofactor.AsyncTrustedDeviceSecondFactor(account: findmy.reports.account.AsyncAppleAccount)#
Bases:
AsyncSecondFactorMethod
,TrustedDeviceSecondFactorMethod
An async implementation of
TrustedDeviceSecondFactorMethod()
.- async request() None #
- async submit(code: str) findmy.reports.state.LoginState #
- class findmy.reports.twofactor.SyncTrustedDeviceSecondFactor(account: findmy.reports.account.AppleAccount)#
Bases:
SyncSecondFactorMethod
,TrustedDeviceSecondFactorMethod
A sync implementation of
TrustedDeviceSecondFactorMethod()
.- request() None #
- submit(code: str) findmy.reports.state.LoginState #