|
|
@ -69,6 +69,7 @@ class Credentials : public ::node::ObjectWrap { |
|
|
|
static NAN_METHOD(CreateFake); |
|
|
|
static NAN_METHOD(CreateFake); |
|
|
|
static NAN_METHOD(CreateIam); |
|
|
|
static NAN_METHOD(CreateIam); |
|
|
|
static NAN_METHOD(CreateInsecure); |
|
|
|
static NAN_METHOD(CreateInsecure); |
|
|
|
|
|
|
|
static NAN_METHOD(CreateFromPlugin); |
|
|
|
static NanCallback *constructor; |
|
|
|
static NanCallback *constructor; |
|
|
|
// Used for typechecking instances of this javascript class
|
|
|
|
// Used for typechecking instances of this javascript class
|
|
|
|
static v8::Persistent<v8::FunctionTemplate> fun_tpl; |
|
|
|
static v8::Persistent<v8::FunctionTemplate> fun_tpl; |
|
|
@ -76,6 +77,19 @@ class Credentials : public ::node::ObjectWrap { |
|
|
|
grpc_credentials *wrapped_credentials; |
|
|
|
grpc_credentials *wrapped_credentials; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Auth metadata plugin functionality */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct plugin_state { |
|
|
|
|
|
|
|
Nan::Callback *callback; |
|
|
|
|
|
|
|
} plugin_state; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void plugin_get_metadata(void *state, const char *service_url, |
|
|
|
|
|
|
|
grpc_credentials_plugin_metadata_cb cb, void *user_data); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void plugin_destroy_state(void *state); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static NAN_METHOD(PluginCallback); |
|
|
|
|
|
|
|
|
|
|
|
} // namespace node
|
|
|
|
} // namespace node
|
|
|
|
} // namespace grpc
|
|
|
|
} // namespace grpc
|
|
|
|
|
|
|
|
|
|
|
|