1 # proxmox_login_manager
3 A basic login management library which handles authentication in combination
4 with the proxmox_dart_api_client library.
6 You need to build the model classes before using it, to do this use:
8 flutter packages pub run build_runner build
13 onLogin: (ProxmoxApiClient client) => whatever you want to do with the client,
16 This will give you an authenticated ProxmoxApiClient for usage in your project.
18 The latest session will be saved and can be recovered.
20 loginStorage = await ProxmoxLoginStorage.fromLocalStorage();
21 final apiClient = await loginStorage.recoverLatestSession();
23 This will either return an authenticated ProxmoxApiClient or will result in an
24 Exception (ProxmoxApiException).
26 To clear all session on logout you can use:
28 ProxmoxLoginStorage.fromLocalStorage()
29 .then((storage) => storage?.invalidateAllSessions());