Skip to content

Add login/logout and store token to config file - #1

Merged
Cody A. Ray (codyaray) merged 1 commit into
masterfrom
auth-token
May 4, 2018
Merged

Add login/logout and store token to config file#1
Cody A. Ray (codyaray) merged 1 commit into
masterfrom
auth-token

Conversation

@codyaray

Copy link
Copy Markdown
Contributor

@confluentinc/caas

$ go run main.go login --url https://stag.cpdev.cloud
2018-05-02T12:52:48.012-0500 [DEBUG] plugin: starting plugin: path=/bin/sh args="[sh -c /Users/cody/code/go/bin/confluent-connect-plugin]"
2018-05-02T12:52:48.014-0500 [DEBUG] plugin: waiting for RPC address: path=/bin/sh
2018-05-02T12:52:48.028-0500 [DEBUG] plugin.sh: plugin address: address=/var/folders/81/kbvhd83n2sj12dy2xnxjc0140000gp/T/plugin575483489 network=unix timestamp=2018-05-02T12:52:48.028-0500
Enter your Confluent Cloud credentials:
Email: cody@confluent.io
Password: 
Logged in as cody@confluent.io

$ cat ~/.confluent/config.hcl
"auth_token" = "eyJhbGciOiJIUzI1NiIsInR5cCI6Ik..."

$ go run main.go logout
2018-05-02T12:53:06.544-0500 [DEBUG] plugin: starting plugin: path=/bin/sh args="[sh -c /Users/cody/code/go/bin/confluent-connect-plugin]"
2018-05-02T12:53:06.546-0500 [DEBUG] plugin: waiting for RPC address: path=/bin/sh
2018-05-02T12:53:06.557-0500 [DEBUG] plugin.sh: plugin address: address=/var/folders/81/kbvhd83n2sj12dy2xnxjc0140000gp/T/plugin083074154 network=unix timestamp=2018-05-02T12:53:06.557-0500
You are now logged out

$ cat ~/.confluent/config.hcl
"auth_token" = ""

Logging still needs some work. Updated logrus to tweak the output a bit. Still need to integrate/silence the go-plugin logging for non-debug usage.

@codyaray
Cody A. Ray (codyaray) requested a review from a team May 2, 2018 17:59
@codyaray
Cody A. Ray (codyaray) force-pushed the auth-token branch 5 times, most recently from 8c6f6a9 to 89f5384 Compare May 2, 2018 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant