From 9835cf02349840524491bd1684e5b7ea39b63ada Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Mon, 9 Mar 2015 16:56:44 -0700 Subject: Adding refresh token credentials. - The google default credentials now work with the cloud SDK. - Verified end to end with print_default_credentials and fetch_oauth2 tools. --- include/grpc/grpc_security.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index ab2cc08489..f94183457b 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); -- cgit v1.2.3