🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@bitwarden/sdk-napi

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitwarden/sdk-napi

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

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
5.3K
61.07%
Maintainers
3
Weekly downloads
 
Created
Source

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 stateFile = "some/path/to/state/file";

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

// Authenticating using a machine account access token
await client.auth().loginAccessToken(accessToken, stateFile);

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

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

FAQs

Package last updated on 30 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts