jalismrs/bitwarden-php

There is no license information available for the latest version (1.1.0) of this package.

Services to access bitwarden data

1.1.0 2022-11-14 09:30 UTC

This package is auto-updated.

Last update: 2024-11-11 22:02:34 UTC


README

Requirements

Bitwarden CLI must be installed on host system

--> https://bitwarden.com/help/article/cli/

If necessary, set a custom bitwarden server url:

--> bw config server <SERVER_URL>

Installation

composer require jalismrs/bitwarden-php

or

{
  "require": {
    "jalismrs/bitwarden-php": "^1.0"
  }
}

Usage

You must implement a BitwardenServiceDelegate to create an instance of this service.

then:

$service = new BitwardenService(new MyBitwardenDelegate());
$items = $service->searchItems('web5902');

/** @var BitwardenItem $item */
$item = $items[0];
var_dump($item->getId());
var_dump($item->getName());
var_dump($item->getLogin()?->getUsername());
var_dump($item->getLogin()?->getPassword());