token-store
Manage tokens for authenticating to multiple servers.
About
This was built for staticland, a static site hosting API. It's possible to create a new staticland server that manages static sites, so it's useful to be able to log into multiple servers.
This module provides a way to store the token for each server and switch between them.
token-store is meant to be used as a dependency of command-line tools that handle authentication and need a way to store the auth tokens that are returned.
Install
npm install --save token-store
Usage
var tokenStore = var tokens = /* add a token */tokens var current = tokenscurrentconsole /* add another token */tokens var current = tokenscurrentconsole /* list all tokens */console /* set current token from available tokens */if tokens current = tokenscurrent'http://127.0.0.1:3322' console /* delete a token */tokens /* list all tokens */console /* completely destroy token store file! */tokens
Documentation
Examples
Contributing
Contributions are welcome! Please read the contributing guidelines first.
Conduct
It's important that this project contributes to a friendly, safe, and welcoming environment for all, particularly for folks that are historically underrepresented in technology. Read this project's code of conduct
Change log
Read about the changes to this project in CHANGELOG.md. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Contact
- chat – You can chat about this project at http://gitter.im/sethvincent/ask
- issues – Please open issues in the issues queue
- twitter – @sethdvincent
- email – Need in-depth support via paid contract? Send an email to sethvincent@gmail.com