CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
README.md95 linesDownload Raw Back to keytar
1# keytar - Node module to manage system keychain2 3[![Travis Build Status](https://travis-ci.org/atom/node-keytar.svg?branch=master)](https://travis-ci.org/atom/node-keytar)4[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/atom/node-keytar?svg=true)](https://ci.appveyor.com/project/Atom/node-keytar)5[![Dependency Status](https://david-dm.org/atom/node-keytar.svg)](https://david-dm.org/atom/node-keytar)6 7A native Node module to get, add, replace, and delete passwords in system's keychain. On macOS the passwords are managed by the Keychain, on Linux they are managed by the Secret Service API/libsecret, and on Windows they are managed by Credential Vault.8 9## Installing10 11```sh12npm install keytar13```14 15### On Linux16 17Currently this library uses `libsecret` so you may need to install it before running `npm install`.18 19Depending on your distribution, you will need to run the following command:20 21* Debian/Ubuntu: `sudo apt-get install libsecret-1-dev`22* Red Hat-based: `sudo yum install libsecret-devel`23* Arch Linux: `sudo pacman -S libsecret`24 25## Building26 27  * Clone the repository28  * Run `npm install`29  * Run `npm test` to run the tests30 31## Supported versions32 33Each release of `keytar` includes prebuilt binaries for the versions of Node and Electron that are actively supported by these projects. Please refer to the release documentation for [Node](https://github.com/nodejs/Release) and [Electron](https://electronjs.org/docs/tutorial/support) to see what is supported currently.34 35## Bindings from other languages36 37- [Rust](https://crates.io/crates/keytar)38 39## Docs40 41```javascript42const keytar = require('keytar')43```44 45Every function in keytar is asynchronous and returns a promise. The promise will be rejected with any error that occurs or will be resolved with the function's "yields" value.46 47### getPassword(service, account)48 49Get the stored password for the `service` and `account`.50 51`service` - The string service name.52 53`account` - The string account name.54 55Yields the string password or `null` if an entry for the given service and account was not found.56 57### setPassword(service, account, password)58 59Save the `password` for the `service` and `account` to the keychain. Adds a new entry if necessary, or updates an existing entry if one exists.60 61`service` - The string service name.62 63`account` - The string account name.64 65`password` - The string password.66 67Yields nothing.68 69### deletePassword(service, account)70 71Delete the stored password for the `service` and `account`.72 73`service` - The string service name.74 75`account` - The string account name.76 77Yields `true` if a password was deleted, or `false` if an entry with the given service and account was not found.78 79### findCredentials(service)80 81Find all accounts and password for the `service` in the keychain.82 83`service` - The string service name.84 85Yields an array of `{ account: 'foo', password: 'bar' }`.86 87### findPassword(service)88 89Find a password for the `service` in the keychain. This is ideal for scenarios where an `account` is not required.90 91`service` - The string service name.92 93Yields the string password, or `null` if an entry for the given service was not found.94 95 
basant307/AI_Governance_Project · CoolFace