JSPM

@buttercup/credentials

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 21
  • Score
    100M100P100Q82600F
  • License MIT

Encrypted credentials handler for Buttercup

Package Exports

  • @buttercup/credentials

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@buttercup/credentials) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Buttercup Credentials

Encrypted credentials handler for Buttercup

Build Status npm version

About

This library provides the Credentials implementation used throughout the Buttercup suite. Credentials is a toolkit to handle account/login data in a secure manner by providing easy encryption/decryption of user details.

Installation

Simply run npm install @buttercup/credentials --save to install.

This library requires @buttercup/app-env for environment and low-level functionality initialisation. This is usually performed alongside buttercup core.

Usage

Credentials can be created in a variety of ways:

const Credentials = require("@buttercup/credentials");

// ---

const c1 = new Credentials();
c1.username = "bob";
c1.password = "test123";

const c2 = new Credentials({ type: "example", username: "alice", password: "123test" });

const c3 = Credentials.fromPassword("amazingPass");

Credentials
    .fromSecureString(encryptedString, "myPass")
    .then(creds => { /* ... */ });

For more details on what methods are available, check the API documentation.

Note: The type field is used internally by Buttercup, but is not required for external usage.