KeeperSecurity.Authentication.Sync Namespace

Provides types for connecting to Keeper servers (sync).

Example

C#
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();
        }
    }
}

Classes

AuthStep Represents base Keeper authentication step
AuthSync Represents Keeper authentication. (sync)
ConnectedStep Represents Connected step. Final step. Successfully connected to Keeper.
DeviceApprovalStep Represents device approval step
ErrorStep Represents Error step. Final step. Failed to connect to Keeper.
PasswordStep Represents Master Password step
ReadyToLoginStep Represents initial Login step
RestrictedConnectionStep Represents Restricted Connection step. Final step. The connection is limited only to certain commands.
SsoDataKeyStep Represents SSO Approval step
SsoTokenStep Represents SSO Login step
TwoFactorStep Represents Two Factor Authentication step

Interfaces

IAuthSyncCallback Defines the user interface methods required for authentication with Keeper (sync).

Enumerations

AuthState Specifies authentication states.