KeeperSecurity.Vault Namespace |
Class | Description | |
---|---|---|
![]() | ApplicationRecord |
Represents a Keeper Secret Manager Application Record.
|
![]() | AttachmentFile |
Represents attachment file.
|
![]() | AttachmentFileThumb |
Represents a thumbnail of attachment.
|
![]() | AttachmentUploadTask |
Creates an attachment upload task.
|
![]() | CustomField |
Represents a custom field.
|
![]() | ExtraField |
Represents an extra field.
|
![]() | FieldType |
Record Types Schema: Field Type definition.
|
![]() | FieldTypeAddress |
"address" field type
|
![]() | FieldTypeBankAccount |
"bankAccount" field type
|
![]() | FieldTypeHost |
"host" field type
|
![]() | FieldTypeKeyPair |
"keyPair" field type
|
![]() | FieldTypeName |
"name" field type
|
![]() | FieldTypePaymentCard |
"paymentCard" field type
|
![]() | FieldTypePhone |
"phone" field type
|
![]() | FieldTypeSecurityQuestion |
"securityQuestion" field type
|
![]() | FileAttachmentUploadTask |
Creates a file attachment upload task.
|
![]() | FileRecord |
Represents a Keeper File Record.
|
![]() | FolderNode |
Represents folder.
|
![]() | InMemoryKeeperStorage |
Provides in memory implementation of IKeeperStorage interface.
|
![]() | KeeperRecord |
Represents generic Keeper Record
|
![]() | NoActiveShareWithUserException |
Represents an exception that occurs when current user requests other user's public for the first time.
|
![]() | PasswordRecord |
Represents a Legacy Keeper Record.
|
![]() | RecordField |
Record Types Schema: Field definition.
|
![]() | RecordPath |
Represents a record in folder.
|
![]() | RecordSharePermissions |
Represent record sharing information
|
![]() | RecordType |
Record Types Schema: Record Type definition.
|
![]() | RecordTypeField |
Record Types Schema: Record Field definition.
|
![]() | RecordTypePasswordField | |
![]() | RecordTypesConstants |
Record Types Schema: Fields
|
![]() | SecretManagerShare | |
![]() | SecretsManagerApplication | |
![]() | SecretsManagerDevice | |
![]() | SharedFolder |
Represents Shared Folder.
|
![]() | SharedFolderOptions |
Defines shared folder user and record permissions.
|
![]() | SharedFolderPermission |
Represents shared folder user permissions.
|
![]() | SharedFolderRecord |
Represents shared folder record permissions.
|
![]() | SharedFolderRecordOptions |
Represents shared folder record permissions.
|
![]() | SharedFolderRecordPermissions |
Represents record permissions in shared folder.
|
![]() | SharedFolderUserOptions |
Defines shared folder user permissions.
|
![]() | ShareWithUsers |
Represent user list available for sharing
|
![]() | SyncDownExtensions |
Provides a set of static methods for syncing down vault.
|
![]() | Team |
Represents team properties that user is member of.
|
![]() | TeamInfo |
Represents basic team properties.
|
![]() | TypedFieldT |
Represents a typed field.
|
![]() | TypedRecord |
Represents a Typed Record
|
![]() | UserRecordPermissions |
Represents record permissions for user.
|
![]() | VaultData |
Represents Keeper vault loaded from the IKeeperStorage and decrypted.
|
![]() | VaultException |
The exception that is thrown by the Vault module.
|
![]() | VaultOnline |
Represents Keeper Vault connected to Keeper server.
|
Interface | Description | |
---|---|---|
![]() | IAttachment |
Defines property for file attachment
|
![]() | IAttachmentUploadTask |
Defines properties of file upload task.
|
![]() | IEnterpriseTeam |
Defines properties for Enterprise Team.
|
![]() | IEntityStorageT |
Defines entity storage methods.
|
![]() | IFieldTypeSerialize |
Defines access methods for compound record types
|
![]() | IFolder |
Defines properties for folder.
|
![]() | IFolderRecordLink |
Defines properties record-folder link.
|
![]() | IKeeperStorage |
Defines properties for offline Keeper vault storage.
|
![]() | INonSharedData |
Defines non-shared data properties.
|
![]() | IPredicateStorageT |
Defines entity link storage methods.
|
![]() | IRecordAccessPath |
Defines record access path properties.
|
![]() | IRecordMetadata |
Defines Record Key Metadata properties.
|
![]() | IRecordType |
Defines properties for Record Types.
|
![]() | IRecordTypeField |
Defines common properties for Record Field
|
![]() | ISecretManager |
Define methods for Keeper Secret Maneger (KSM)
|
![]() | ISharedFolder |
Defines properties for shared folder.
|
![]() | ISharedFolderAccessPath |
Defines shared folder access path properties.
|
![]() | ISharedFolderKey |
Defines shared folder key properties.
|
![]() | ISharedFolderPermission |
Defines properties for shared folder user permissions.
|
![]() | ISharedFolderRecordOptions |
Defines shared folder record permissions.
|
![]() | ISharedFolderUserOptions |
Defines shared folder user permissions.
|
![]() | IStorageRecord |
Defines Password Record properties.
|
![]() | IThumbnailUploadTask |
Defines properties of thumbnail upload task.
|
![]() | ITypedField |
Defines properties for typed record field
|
![]() | IVault |
Defines methods for modifying the vault records and folders.
|
![]() | IVaultData |
Defines properties and methods of decrypted Vault data.
|
![]() | IVaultFileAttachment |
Defines methods to manipulate file attachments.
|
![]() | IVaultSharedFolder |
Defines methods to manipulate Shared Folders.
|
![]() | IVaultUi |
Defines methods for interaction between Vault API and user.
|
Enumeration | Description | |
---|---|---|
![]() | FolderType |
Specifies folder types.
|
![]() | KeyType |
Specifies key used for entity encryption.
|
![]() | RecordFieldMultiple |
Specifies if Record Field allows multiple values.
|
![]() | RecordTypeScope |
Specifies Record Type Scope
|
![]() | SecretManagerSecretType | |
![]() | UserType |
Specifies shared folder user type.
|
using System.Linq; using System.Threading; using System.Threading.Tasks; using KeeperSecurity.Authentication; using KeeperSecurity.Vault; internal static class Program { private static async Task Main() { IAuthentication auth = await ConnectToKeeperAs("username@company.com"); var vault = new VaultOnline(auth); Console.WriteLine("\nRetrieving records..."); await vault.SyncDown(); Console.WriteLine($"Hello {auth.Username}!"); Console.WriteLine($"Your vault has {vault.RecordCount} records."); // Find record with title "Google" var search = vault.Records.FirstOrDefault(x => string.Compare(x.Title, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); // Create a record if it does not exist. if (search == null) { search = new PasswordRecord { Title = "Google", Login = "/Account Name/", Password = "/Account Password/", Link = "https://google.com", Notes = "Stores google credentials" }; search = await vault.CreateRecord(search); } // Update record. search.SetCustomField("Security Token", "11111111"); search = await vault.UpdateRecord(search); // find file attachment. var attachment = search.Attachments .FirstOrDefault(x => string.Compare(x.Title, "google", StringComparison.InvariantCultureIgnoreCase) == 0); if (attachment == null) { // Upload local file "google.txt" var uploadTask = new FileAttachmentUploadTask("google.txt") { Title = "Google", }; await vault.UploadAttachment(search, uploadTask); } else { // Download attachment into local file "google.txt" await using var stream = File.OpenWrite("google.txt"); await vault.DownloadAttachment(search, attachment.Id, stream); // Delete attachment. Remove it from the record search.Attachments.Remove(attachment); await vault.UpdateRecord(search); } // Find shared folder with name "Google". var sharedFolder = vault.SharedFolders .FirstOrDefault(x => string.Compare(x.Name, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); if (sharedFolder == null) { // Create shared folder. var folder = await vault.CreateFolder("Google", null, new SharedFolderOptions { ManageRecords = true, ManageUsers = false, CanEdit = false, CanShare = false, }); vault.TryGetSharedFolder(folder.FolderUid, out sharedFolder); } // Add user to shared folder. await vault.PutUserToSharedFolder(sharedFolder.Uid, "user@google.com", UserType.User, new SharedFolderUserOptions { ManageRecords = false, ManageUsers = false, }); // Add record to shared folder. await vault.MoveRecords(new[] { new RecordPath { RecordUid = search.Uid } }, sharedFolder.Uid, true); } }