API wrapper for passwork.me
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kami 4d0cffe6da init 1 month ago
.gitignore init 1 month ago
README.md init 1 month ago
index.js init 1 month ago
package-lock.json init 1 month ago
package.json init 1 month ago

README.md

passwork

API Wrapper for passwork

Installation

$ npm i git+https://git.varelus.com/kami/passwork.git

Usage

const Passwork = require('passwork')

const main = async () => {
  try {
    const passwork = await Passwork({
      url: process.env.URL,
      user: process.env.USER,
      pass: process.env.PASS,
      master: process.env.MASTER
    })
    const vault = passwork.filter(x => x.name === 'Meine Passwörter')
    const passwords = vault.passwords()
    console.log(passwords)
    /*
        [{ // array of passwords
            'id' : '...', // password id
            'categoryId' : '...', // folder id
            'groupId' : '...', // vault id
            'name' : '...', // password name
            'login' : '...',
            'url', : '...',
            'description' : '...',
            'pass' : '...', // decrypted password
            }]
        }]
    */
  } catch (e) {
    console.log(e)
  }
}

main()

API

await Passwork(args)

Requires

  • args.url URL of passwork instance (default: https://passwork.me)
  • args.user email for login
  • args.pass password for login
  • args.master master password, decryption key

Returns Passwork instance.

Passwork

filter(args)

Same args as baseline js filter over groups (array of vaults) as per Passwork API Reference

Returns Vault instance.

Vault

filter(args)

Same args as baseline js filter over folders and passwords (array of folders and array of passwords) as per Passwork API Reference

passwords()

Returns array of passwords as per Passwork API Reference with cryptedPassword removed and replaced by pass (decrypted password)

folders()

Returns array of folders as per Passwork API Reference with cryptedPassword removed and replaced by pass (decrypted password)