No description
Find a file
2025-11-12 09:32:06 +01:00
assets change proxmox logo styles 2020-09-18 10:34:51 +02:00
lib cleanup: run dart format command to fix formatting 2025-11-12 09:32:06 +01:00
test tree wide: check if build context is still valid after async call 2024-04-09 08:15:26 +02:00
.gitignore initial commit 2020-07-23 14:43:51 +02:00
.metadata initial commit 2020-07-23 14:43:51 +02:00
analysis_options.yaml linter: disable avoid_print rule 2024-04-09 08:15:26 +02:00
LICENSE initial commit 2020-07-23 14:43:51 +02:00
pubspec.lock upgrade dependencies 2025-09-23 13:57:23 +02:00
pubspec.yaml upgrade dependencies 2025-09-23 13:57:23 +02:00
README.md update readme 2020-07-28 12:43:30 +02:00

proxmox_login_manager

A basic login management library which handles authentication in combination with the proxmox_dart_api_client library.

You need to build the model classes before using it, to do this use:

flutter packages pub run build_runner build

Basic usage:

ProxmoxLoginSelector(
    onLogin: (ProxmoxApiClient client) => whatever you want to do with the client,
),

This will give you an authenticated ProxmoxApiClient for usage in your project.

The latest session will be saved and can be recovered.

loginStorage = await ProxmoxLoginStorage.fromLocalStorage();
final apiClient = await loginStorage.recoverLatestSession();

This will either return an authenticated ProxmoxApiClient or will result in an Exception (ProxmoxApiException).

To clear all session on logout you can use:

ProxmoxLoginStorage.fromLocalStorage()
                .then((storage) => storage?.invalidateAllSessions());