aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Yang Gao <yangg@google.com>2015-03-12 14:43:37 -0700
committerGravatar Yang Gao <yangg@google.com>2015-03-12 14:43:37 -0700
commitc3be769409757bd643ddbd079ea2ac509a5ba8fe (patch)
treeb2aa44bdeac10186504607a1717a7eeedaf93adb /include
parent5bdfe1a1894f45303ce58ea024f0cad077316c8f (diff)
parent9835cf02349840524491bd1684e5b7ea39b63ada (diff)
Merge pull request #983 from jboeuf/refresh_token_parsing
Adding refresh token credentials.
Diffstat (limited to 'include')
-rw-r--r--include/grpc/grpc_security.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h
index c297622a51..586cfcffe7 100644
--- a/include/grpc/grpc_security.h
+++ b/include/grpc/grpc_security.h
@@ -117,6 +117,15 @@ grpc_credentials *grpc_service_account_credentials_create(
grpc_credentials *grpc_jwt_credentials_create(const char *json_key,
gpr_timespec token_lifetime);
+/* Creates an Oauth2 Refresh Token crednetials object. May return NULL if the
+ input is invalid.
+ WARNING: Do NOT use this credentials to connect to a non-google service as
+ this could result in an oauth2 token leak.
+ - json_refresh_token is the JSON string containing the refresh token itself
+ along with a client_id and client_secret. */
+grpc_credentials *grpc_refresh_token_credentials_create(
+ const char *json_refresh_token);
+
/* Creates a fake transport security credentials object for testing. */
grpc_credentials *grpc_fake_transport_security_credentials_create(void);