https://github.com/buttercup/credentials
Encrypted credentials handler for Buttercup
https://github.com/buttercup/credentials
buttercup encrypted-credentials-handler encrypted-data
Last synced: 10 months ago
JSON representation
Encrypted credentials handler for Buttercup
- Host: GitHub
- URL: https://github.com/buttercup/credentials
- Owner: buttercup
- License: mit
- Created: 2018-03-21T06:35:20.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T19:23:41.000Z (about 3 years ago)
- Last Synced: 2024-10-29T12:34:09.548Z (over 1 year ago)
- Topics: buttercup, encrypted-credentials-handler, encrypted-data
- Language: JavaScript
- Size: 498 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Buttercup Credentials
> Encrypted credentials handler for Buttercup
[](https://travis-ci.org/buttercup/credentials) [](https://www.npmjs.com/package/@buttercup/credentials)
## :warning: Deprecated
This repository is deprecated since [Buttercup core](https://github.com/buttercup/buttercup-core) version 4, as it is now included in the core library. It is no longer required to include this library as its functionality can be found in the [`buttercup`](https://www.npmjs.com/package/buttercup) dependency.
## 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`](https://github.com/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:
```javascript
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](API.md).
**Note**: The `type` field is used internally by Buttercup, but is not required for external usage.