KeeperSecurity.Authentication.Sync Namespace
Provides types for connecting to Keeper servers (sync).
using System;
using System.Threading.Tasks;
using Cli;
using KeeperSecurity.Authentication;
using KeeperSecurity.Authentication.Sync;
using KeeperSecurity.Configuration;
using KeeperSecurity.Vault;
namespace Sample
{
internal static class Program
{
private static async Task Main()
{
// Keeper SDK needs a storage to save configuration
// such as: last login name, device token, etc
var configuration = new JsonConfigurationStorage("config.json");
var inputManager = new SimpleInputManager();
// Login to Keeper
Console.WriteLine("Logging in...");
var authFlow = new AuthSync(configuration);
await Utils.LoginToKeeper(authFlow, inputManager, "username@company.com");
if (authFlow.Step is ErrorStep es)
{
Console.WriteLine(es.Message);
return;
}
if (!authFlow.IsAuthenticated()) return;
var auth = authFlow;
var vault = new VaultOnline(auth);
await vault.SyncDown();
}
}
}
IAuthSyncCallback |
Defines the user interface methods required for authentication with Keeper (sync).
|