Removed now-redundant credentials wrappings
diff --git a/src/node/ext/credentials.cc b/src/node/ext/credentials.cc
index ec5cc5c..182c99d 100644
--- a/src/node/ext/credentials.cc
+++ b/src/node/ext/credentials.cc
@@ -78,21 +78,12 @@
tpl->InstanceTemplate()->SetInternalFieldCount(1);
fun_tpl.Reset(tpl);
Local<Function> ctr = Nan::GetFunction(tpl).ToLocalChecked();
- Nan::Set(ctr, Nan::New("createDefault").ToLocalChecked(),
- Nan::GetFunction(
- Nan::New<FunctionTemplate>(CreateDefault)).ToLocalChecked());
Nan::Set(ctr, Nan::New("createSsl").ToLocalChecked(),
Nan::GetFunction(
Nan::New<FunctionTemplate>(CreateSsl)).ToLocalChecked());
Nan::Set(ctr, Nan::New("createComposite").ToLocalChecked(),
Nan::GetFunction(
Nan::New<FunctionTemplate>(CreateComposite)).ToLocalChecked());
- Nan::Set(ctr, Nan::New("createGce").ToLocalChecked(),
- Nan::GetFunction(
- Nan::New<FunctionTemplate>(CreateGce)).ToLocalChecked());
- Nan::Set(ctr, Nan::New("createIam").ToLocalChecked(),
- Nan::GetFunction(
- Nan::New<FunctionTemplate>(CreateIam)).ToLocalChecked());
Nan::Set(ctr, Nan::New("createInsecure").ToLocalChecked(),
Nan::GetFunction(
Nan::New<FunctionTemplate>(CreateInsecure)).ToLocalChecked());
@@ -153,15 +144,6 @@
}
}
-NAN_METHOD(Credentials::CreateDefault) {
- grpc_credentials *creds = grpc_google_default_credentials_create();
- if (creds == NULL) {
- info.GetReturnValue().SetNull();
- } else {
- info.GetReturnValue().Set(WrapStruct(creds));
- }
-}
-
NAN_METHOD(Credentials::CreateSsl) {
char *root_certs = NULL;
grpc_ssl_pem_key_cert_pair key_cert_pair = {NULL, NULL};
@@ -222,34 +204,6 @@
}
}
-NAN_METHOD(Credentials::CreateGce) {
- Nan::HandleScope scope;
- grpc_credentials *creds = grpc_google_compute_engine_credentials_create(NULL);
- if (creds == NULL) {
- info.GetReturnValue().SetNull();
- } else {
- info.GetReturnValue().Set(WrapStruct(creds));
- }
-}
-
-NAN_METHOD(Credentials::CreateIam) {
- if (!info[0]->IsString()) {
- return Nan::ThrowTypeError("createIam's first argument must be a string");
- }
- if (!info[1]->IsString()) {
- return Nan::ThrowTypeError("createIam's second argument must be a string");
- }
- Utf8String auth_token(info[0]);
- Utf8String auth_selector(info[1]);
- grpc_credentials *creds =
- grpc_google_iam_credentials_create(*auth_token, *auth_selector, NULL);
- if (creds == NULL) {
- info.GetReturnValue().SetNull();
- } else {
- info.GetReturnValue().Set(WrapStruct(creds));
- }
-}
-
NAN_METHOD(Credentials::CreateInsecure) {
info.GetReturnValue().Set(WrapStruct(NULL));
}
diff --git a/src/node/ext/credentials.h b/src/node/ext/credentials.h
index 95a2800..fd0360e 100644
--- a/src/node/ext/credentials.h
+++ b/src/node/ext/credentials.h
@@ -62,12 +62,8 @@
Credentials &operator=(const Credentials &);
static NAN_METHOD(New);
- static NAN_METHOD(CreateDefault);
static NAN_METHOD(CreateSsl);
static NAN_METHOD(CreateComposite);
- static NAN_METHOD(CreateGce);
- static NAN_METHOD(CreateFake);
- static NAN_METHOD(CreateIam);
static NAN_METHOD(CreateInsecure);
static NAN_METHOD(CreateFromPlugin);
static Nan::Callback *constructor;
diff --git a/src/node/test/credentials_test.js b/src/node/test/credentials_test.js
index 23f01f8..e84ade6 100644
--- a/src/node/test/credentials_test.js
+++ b/src/node/test/credentials_test.js
@@ -60,7 +60,7 @@
};
}
-describe.only('client credentials', function() {
+describe('client credentials', function() {
var Client;
var server;
var port;