aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/client
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-07-13 10:49:06 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-07-13 10:49:06 -0700
commit677c50c92a89870c479230d03fa4a93109310906 (patch)
treead6ad472491450aac35ea2fdd983239fd9251e61 /src/cpp/client
parentec6a7fdef95e7c11d2ddef1c9ed3bc59c389f6ac (diff)
Update C++ impl
Diffstat (limited to 'src/cpp/client')
-rw-r--r--src/cpp/client/secure_credentials.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc
index 4d200908fb..01c7f14f1a 100644
--- a/src/cpp/client/secure_credentials.cc
+++ b/src/cpp/client/secure_credentials.cc
@@ -92,7 +92,8 @@ std::shared_ptr<Credentials> ServiceAccountCredentials(
"with non-positive lifetime");
return WrapCredentials(nullptr);
}
- gpr_timespec lifetime = gpr_time_from_seconds(token_lifetime_seconds);
+ gpr_timespec lifetime =
+ gpr_time_from_seconds(token_lifetime_seconds, GPR_TIMESPAN);
return WrapCredentials(grpc_service_account_credentials_create(
json_key.c_str(), scope.c_str(), lifetime));
}
@@ -105,7 +106,8 @@ std::shared_ptr<Credentials> JWTCredentials(const grpc::string& json_key,
"Trying to create JWTCredentials with non-positive lifetime");
return WrapCredentials(nullptr);
}
- gpr_timespec lifetime = gpr_time_from_seconds(token_lifetime_seconds);
+ gpr_timespec lifetime =
+ gpr_time_from_seconds(token_lifetime_seconds, GPR_TIMESPAN);
return WrapCredentials(
grpc_jwt_credentials_create(json_key.c_str(), lifetime));
}