Skip to content

Commit b02ba33

Browse files
committed
Add copied readme
1 parent 806f51a commit b02ba33

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[![Build Status](https://travis-ci.com/emacs-grammarly/auth-source-keytar.svg?branch=master)](https://travis-ci.com/emacs-grammarly/auth-source-keytar)
2+
[![CELPA](https://celpa.conao3.com/packages/auth-source-keytar-badge.svg)](https://celpa.conao3.com/#/auth-source-keytar)
3+
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
4+
5+
# auth-source-keytar
6+
7+
Emacs Lisp interface for [node-keytar](https://www.npmjs.com/package/keytar)
8+
using [@emacs-grammarly/keytar-cli](https://github.com/emacs-grammarly/keytar-cli).
9+
10+
## Installation
11+
12+
You will need [@emacs-grammarly/keytar-cli](https://github.com/emacs-grammarly/keytar-cli)
13+
before using this library.
14+
15+
```bash
16+
npm install -g @emacs-grammarly/keytar-cli
17+
```
18+
19+
or after you have installed `auth-source-keytar.el` in your `load-path`. Do the following,
20+
21+
```el
22+
(require 'auth-source-keytar)
23+
(auth-source-keytar-install)
24+
```
25+
26+
## Usage
27+
28+
List of supported API ported from [node-keytar](https://www.npmjs.com/package/keytar).
29+
30+
* `auth-source-keytar-get-password`
31+
* `auth-source-keytar-set-password`
32+
* `auth-source-keytar-delete-password`
33+
* `auth-source-keytar-find-credentials`
34+
* `auth-source-keytar-find-password`
35+
36+
*P.S. Checkout the [node-keytar#docs](https://github.com/atom/node-keytar#docs) for details*
37+
38+
## Examples
39+
40+
A small example to use this library in Emacs Lisp.
41+
42+
```el
43+
(auth-source-keytar-set-password "service1" "testuser" "hello") ; t
44+
(auth-source-keytar-find-credentials "service1") ; [ { account: 'testuser', password: 'hello' } ]
45+
(auth-source-keytar-find-password "service1") ; hello
46+
```
47+
48+
If you attempt to use `auth-source` then,
49+
50+
```el
51+
(auth-source-keytar-enable)
52+
(auth-source-keytar-search :service "service1" :account "testuser")
53+
```
54+
55+
## Contribution
56+
57+
If you would like to contribute to this project, you may either
58+
clone and make pull requests to this repository. Or you can
59+
clone the project and establish your own branch of this tool.
60+
Any methods are welcome!

0 commit comments

Comments
 (0)