0.3.1 • Published 7 months ago

@bitwarden/sdk-napi v0.3.1

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
7 months ago

Bitwarden Secrets Manager SDK

Node-API bindings for interacting with the Bitwarden Secrets Manager. This is a beta release and might be missing some functionality.

Getting started

import { BitwardenClient, ClientSettings, DeviceType, LogLevel } from "@bitwarden/sdk-napi";

// Optional settings
const settings: ClientSettings = {
  apiUrl: "https://api.bitwarden.com",
  identityUrl: "https://identity.bitwarden.com",
  userAgent: "Bitwarden SDK",
  deviceType: DeviceType.SDK,
};

const accessToken = "-- REDACTED --";

const client = new BitwardenClient(settings, LogLevel.Info);

// Authenticating using a service accounts access token
const result = await client.loginWithAccessToken(accessToken);
if (!result.success) {
  throw Error("Authentication failed");
}

// List secrets
const secrets = await client.secrets().list();

// Get a specific secret
const secret = await client.secrets().get("secret-id");
0.3.0

10 months ago

0.3.1

7 months ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.3

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.2

1 year ago