LoginFlow V2
Login flow v2 is an authorization process for the standard Nextcloud client that allows each client to have their own set of credentials.
- class nc_py_api.loginflow_v2._LoginFlowV2API(session: NcSession)[source]
Class implementing Nextcloud Login flow v2.
- init(user_agent: str = 'nc_py_api') LoginFlow [source]
Init a Login flow v2.
- Parameters:
user_agent – Application name. Application password will be associated with this name.
- poll(token: str, timeout: int = 1200, step: int = 1, overwrite_auth: bool = True) Credentials [source]
Poll the Login flow v2 credentials.
- Parameters:
token – Token for a polling for confirmation of user authorization.
timeout – Maximum time to wait for polling in seconds, defaults to MAX_TIMEOUT.
step – Interval for polling in seconds, defaults to 1.
overwrite_auth – If True current session will be overwritten with new credentials, defaults to True.
- Raises:
ValueError – If timeout more than 20 minutes.
- class nc_py_api.loginflow_v2.Credentials(raw_data: dict)[source]
The Nextcloud Login flow v2 response with app credentials representation.