-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Conversation
c37a6e3
to
e0aca1f
Compare
examples/grpc-client/client.go
Outdated
} | ||
|
||
func main() { | ||
var caCrt = flag.String("ca_crt", "", "CA certificate") |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
examples/grpc-client/README.md
Outdated
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
e0aca1f
to
0816431
Compare
Addressed all your suggestions 👍 |
0816431
to
c0d5235
Compare
Link in Documentation/api.md? |
Theres a line that says "For further details on the Dex API refer [ |
c0d5235
to
fa2f76b
Compare
Also added the link to this client example in Documentation/api.md. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
The example program implements a Dex client that makes gRPC API calls to create, list and delete passwords.