bitwarden_secrets 1.0.1 copy "bitwarden_secrets: ^1.0.1" to clipboard
bitwarden_secrets: ^1.0.1 copied to clipboard

retracted

Unoficial driver of the Bitwarden Secrets SDK. Bitwarden Secrets Manager enables developers and DevOps teams to centrally store, manage, and deploy secrets at scale.

Bitwarden Secrets #

Unoficial driver of the Bitwarden secrets Manager SDK

Example #

  var accessToken = "<your access token>";
  var organizationId = "<your organization id>";

  // Create a bitwarden client
  var bws = BitwardenSecrets(organizationId);

  // Authroize
  bws.accessTokenLogin(accessToken, statePath: "temp.txt");

  // Create a project and secret
  var project = bws.projectCreate("my-project");
  var secret = bws.secretCreate("foo-api-Key", "xxxx-xxxx-xxxxxxx", project.id);

  // List Secrets
  List<SecretHeader> secrets = bws.secretList();

  // List Projects
  List<Project> projects = bws.projectList();

Lookup Secret By Key #

To look up a secret by key, you must list all the secrets and search for it.

Secret lookupByName(BitwardenSecrets bws, String key) {
  var header = bws.secretList().singleWhere((e) => e.key == key);
  return bws.secretGet(header.id);
}

// Lookup the value of a secret with a the given key
var fooApiKey = lookupByName(bws, "foo-api-key").value;
1
likes
0
points
114
downloads

Publisher

unverified uploader

Weekly Downloads

Unoficial driver of the Bitwarden Secrets SDK. Bitwarden Secrets Manager enables developers and DevOps teams to centrally store, manage, and deploy secrets at scale.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

ffi

More

Packages that depend on bitwarden_secrets