From 20f68f6a63713ab2a9d59732cbc6c8a956c8735e Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Wed, 24 Jun 2015 09:44:39 -0400 Subject: [PATCH 1/2] Add syntax highlighting for C++ code samples. --- grpc-auth-support.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grpc-auth-support.md b/grpc-auth-support.md index 6a5ef0f..78dfd9a 100644 --- a/grpc-auth-support.md +++ b/grpc-auth-support.md @@ -31,7 +31,7 @@ Tokens to each request being made on the channel. This is the simplest authentication scenario, where a client just wants to authenticate the server and encrypt all data. -``` +```cpp SslCredentialsOptions ssl_opts; // Options to override SSL params, empty by default // Create the credentials object by providing service account key in constructor std::unique_ptr creds = CredentialsFactory::SslCredentials(ssl_opts); @@ -52,7 +52,7 @@ passed to the factory method. gRPC applications can use a simple API to create a credential that works in various deployment scenarios. -``` +```cpp std::unique_ptr creds = CredentialsFactory::GoogleDefaultCredentials(); // Create a channel, stub and make RPC calls (same as in the previous example) std::shared_ptr channel = CreateChannel(server_name, creds, channel_args); From 05514b042497a4584ec092f40af09d811f904da5 Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Wed, 24 Jun 2015 09:45:20 -0400 Subject: [PATCH 2/2] Fix comments: code blocks ignore MarkDown. --- grpc-auth-support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grpc-auth-support.md b/grpc-auth-support.md index 78dfd9a..7f538d1 100644 --- a/grpc-auth-support.md +++ b/grpc-auth-support.md @@ -108,7 +108,7 @@ stub = Helloworld::Greeter::Stub.new('localhost:50051') ... # Authenticating with Google -require 'googleauth' # from [googleauth](http://www.rubydoc.info/gems/googleauth/0.1.0) +require 'googleauth' # from http://www.rubydoc.info/gems/googleauth/0.1.0 ... creds = GRPC::Core::Credentials.new(load_certs) # load_certs typically loads a CA roots file scope = 'https://www.googleapis.com/auth/grpc-testing'