@ibm-wch-sdk/cli-credentials
> TODO: description
Last updated 2 months ago by carstenleue .
MIT · Original npm · Tarball · package.json
$ cnpm install @ibm-wch-sdk/cli-credentials 
SYNC missed versions from official npm registry.

Credential Management for WCH CLI

Utility library to manage credentials for use with WCH CLI projects.

Installation

Local install for use from an NPM script:

npm install --save-dev @ibm-wch-sdk/cli-credentials

Credential Management

The credentials used to access a tenant can be stored securely on your development machine. Depending on the operating system, use one of the following options.

Credential Management (Windows)

Under Windows use the Credential Manager to store your credentials for WCH. You can start the credential manager by navigating to Control Panel\User Accounts and Family Safety\Credential Manager. Create a new Generic Credential. As Internet or network address choose the API URL from WCH, make sure end the URL with a trailing slash. Enter your WCH username and password and hit OK.

Credential Management (macOS)

Under macOS use the Keychain Access to store your credentials for WCH. Use the API URL from WCH as the name of the credenitial, this will automatically make it an internet credential. Enter your WCH username and password and hit OK.

Credential Management (Linux)

Under Linux the credentials are read from the ${home}/.ibm-wch-sdk-cli/.credentials file. Use the store credentials command to securely persist the credentials in this file.

Credential Storage

Stores a user name and password WCH in the file ${home}/.ibm-wch-sdk-cli/.credentials. The password is encrypted using the private SSH key found in ${home}/.ssh/id_rsa. This command has been designed to work in a Unix environment, but it will also for for Windows provided an SSH key exists at the specified location. Disclaimer this method requires password free access to the SSH key.

Note

If the file ${home}/.ssh/id_rsa does not exist, you can create one using the following shell command:

ssh-keygen -t rsa -q -f ~/.ssh/id_rsa -P ""

Usage

The module exports the following functions to work with credentials:

wchGetCredentials

Reads the credentials for the given API URL.

function wchGetCredentials(
  aApiUrl: string,
  aOptions?: Options
): Promise<Credentials>;
  • aApiUrl: the API URL for your tenant
  • aOptions: optional options to control logging

wchStoreCredentials

Stores the given credentials in the ${home}/.ibm-wch-sdk-cli/.credentials file in every environment (including Windows).

function wchStoreCredentials(
  aWchToolsOptions: WchToolsOptions,
  aOptions?: Options
): Promise<string>;
  • aWchToolsOptions: credentials and API URL
  • aOptions: optional options to control logging

wchRemoveCredentials

Removes the credentials for the given API URL from the ${home}/.ibm-wch-sdk-cli/.credentials file in every environment (including Windows).

function wchRemoveCredentials(
  aApiUrl: string,
  aOptions?: Options
): Promise<string>;
  • aApiUrl: the API URL for your tenant
  • aOptions: optional options to control logging

Current Tags

  • 7.0.165                                ...           Angular7 (2 years ago)
  • 9.0.10076                                ...           latest (2 months ago)
  • 7.0.22                                ...           next (2 years ago)

35 Versions

  • 9.0.10076                                ...           2 months ago
  • 9.0.10067                                ...           2 months ago
  • 9.0.10040                                ...           2 months ago
  • 9.0.10034                                ...           2 months ago
  • 9.0.495                                ...           3 months ago
  • 9.0.493                                ...           3 months ago
  • 9.0.462                                ...           3 months ago
  • 9.0.407                                ...           3 months ago
  • 9.0.384                                ...           3 months ago
  • 9.0.361                                ...           3 months ago
  • 9.0.360                                ...           3 months ago
  • 9.0.271                                ...           4 months ago
  • 9.0.251                                ...           4 months ago
  • 9.0.242                                ...           4 months ago
  • 9.0.216                                ...           4 months ago
  • 9.0.209                                ...           4 months ago
  • 6.0.524                                ...           a year ago
  • 7.2.608                                ...           a year ago
  • 7.2.591                                ...           a year ago
  • 7.2.435                                ...           a year ago
  • 7.2.407                                ...           a year ago
  • 7.2.358                                ...           a year ago
  • 7.2.291                                ...           a year ago
  • 7.2.290                                ...           a year ago
  • 6.0.498                                ...           a year ago
  • 6.0.496                                ...           a year ago
  • 6.0.477                                ...           a year ago
  • 7.0.165                                ...           2 years ago
  • 7.0.163                                ...           2 years ago
  • 7.0.151                                ...           2 years ago
  • 6.0.455                                ...           2 years ago
  • 7.0.25                                ...           2 years ago
  • 7.0.22                                ...           2 years ago
  • 7.0.16                                ...           2 years ago
  • 7.0.14                                ...           2 years ago
Downloads
Today 0
This Week 36
This Month 37
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |