1.0.6 • Published 2 years ago

wechaty-token v1.0.6

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

wechaty-token

NPM NPM Version npm (tag) TypeScript

Wechaty Token Based Authentication Manager

Install

npm install -g wechaty-token

Usage

$ wechaty-token --help

wechaty-token <subcommand>
> Wechaty utility for discovering and generating tokens

where <subcommand> can be one of:

- generate - Generate a new Wechaty Token
- discover - Wechaty TOKEN Service Discovery

For more help, try running `wechaty-token <subcommand> --help`

Wechaty Token Discovery

$ wechaty-token discover --help

wechaty-token discover
> Wechaty TOKEN Service Discovery

ARGUMENTS:
  <str> - Wechaty Puppet Service TOKEN

FLAGS:
  --help, -h - show help

Example:

# Discover a valid token (in-service)
$ wechaty-token discover puppet_IN_SERVICE_TOKEN
{ host: '8.7.5.2', port: 58871 }
$ echo $?
0

# Discover a unvalid token (out-of-service)
$ wechaty-token discover puppet_OUT_OF_SERVICE_TOKEN
NotFound
$ echo $?
1

Generate Wechaty Token

$ wechaty-token generate --help

wechaty-token generate
> Generate a new Wechaty Token

OPTIONS:
  --type, -t <str> - The type of the Wechaty Puppet Service [optional]

FLAGS:
  --help, -h - show help

Example:

# Generate a UUID token
$ wechaty-token generate
1fab726b-e3d3-40ce-8b7b-d3bd8c9fd280

# Generate token with type `foo`
$ wechaty-token generate --type foo
puppet_foo_1fab726b-e3d3-40ce-8b7b-d3bd8c9fd280

History

master

v0.1 master (Aug 2, 2021)

  1. wechaty-token CLI released
  2. gRPC Resolver for Wechaty: enable schema wechaty:///puppet_TOKEN for gRPC client

v0.0.1 (Aug 1, 2021)

Inited

Author

Huan LI (李卓桓), Google Developer Expert (Machine Learning), zixia@zixia.net

Profile of Huan LI (李卓桓) on StackOverflow

Copyright & License

  • Code & Docs © 2018-now Huan LI \zixia@zixia.net\
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons
1.1.1

2 years ago

1.1.2

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

0.5.8

3 years ago

0.5.7

3 years ago

0.5.5

3 years ago

0.4.4

3 years ago

0.4.3

3 years ago

0.4.2

3 years ago

0.3.1

3 years ago

0.2.1

3 years ago

0.1.7

3 years ago

0.1.4

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago