Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: adding a gRPC client example. #812

Merged
merged 1 commit into from
Feb 28, 2017

Conversation

rithujohn191
Copy link
Contributor

The example program implements a Dex client that makes gRPC API calls to create, list and delete passwords.

}

func main() {
var caCrt = flag.String("ca_crt", "", "CA certificate")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we generally use "-" in flags instead of "_"

Also the var is redundant. You can just do "caCert := flag.String"

@@ -0,0 +1,81 @@
# OpenSSL configuration file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where's this from? Unless you wrote it yourself, please add a comment about its origin.

Finally run the Dex client providing the CA certificate, client certificate and client key as arguments.

```
./grpc-client -ca_crt=ca.crt -client_crt=client.crt -client_key=client.key
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./bin/grpc-client?

@@ -0,0 +1,4 @@
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a .gitignore file to ignore the certs and keys too.

Copy link
Contributor

@ericchiang ericchiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple nits. otherwise looks good.

@rithujohn191
Copy link
Contributor Author

Addressed all your suggestions 👍

@ericchiang
Copy link
Contributor

Link in Documentation/api.md?

@rithujohn191
Copy link
Contributor Author

Theres a line that says "For further details on the Dex API refer [Documentation/api.md]" in the README. Would you like me to rephrase that?

@rithujohn191
Copy link
Contributor Author

Also added the link to this client example in Documentation/api.md.

Copy link
Contributor

@ericchiang ericchiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rithujohn191 rithujohn191 merged commit 3797a71 into dexidp:master Feb 28, 2017
@rithujohn191 rithujohn191 deleted the example-client branch February 28, 2017 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants