aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar jboeuf <jboeuf@users.noreply.github.com>2015-03-16 10:04:08 -0700
committerGravatar jboeuf <jboeuf@users.noreply.github.com>2015-03-16 10:04:08 -0700
commitc91a9f942e948c081f10a512d1c1be0926c845c7 (patch)
tree905a769ff37f0690fac5b3d3afe1e9c86cfd3649 /include
parent4c3ee74d4eaa8ad2772f9a069e41813cd8188956 (diff)
parent2fbbb9bd95cd6803afaf66e0cffb18d9189f731b (diff)
Merge pull request #1011 from yang-g/jwt
Put back C++ JWTCredentials code and add a test case in interop test.
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/credentials.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/grpc++/credentials.h b/include/grpc++/credentials.h
index c677cc3e0a..59ad638f47 100644
--- a/include/grpc++/credentials.h
+++ b/include/grpc++/credentials.h
@@ -105,6 +105,14 @@ std::unique_ptr<Credentials> ServiceAccountCredentials(
const grpc::string& json_key, const grpc::string& scope,
std::chrono::seconds token_lifetime);
+// Builds JWT credentials.
+// json_key is the JSON key string containing the client's private key.
+// token_lifetime is the lifetime of each Json Web Token (JWT) created with
+// this credentials. It should not exceed grpc_max_auth_token_lifetime or
+// will be cropped to this value.
+std::unique_ptr<Credentials> JWTCredentials(
+ const grpc::string& json_key, std::chrono::seconds token_lifetime);
+
// Builds IAM credentials.
std::unique_ptr<Credentials> IAMCredentials(
const grpc::string& authorization_token,