1.0.6 • Published 2 years ago
wechaty-token v1.0.6
wechaty-token
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)
wechaty-token
CLI released- 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
Copyright & License
- Code & Docs © 2018-now Huan LI \zixia@zixia.net\
- Code released under the Apache-2.0 License
- Docs released under Creative Commons