diff --git a/package.json b/package.json index ac14740..f5422dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sspi-client", - "version": "0.1.0", + "version": "0.1.1", "description": "SSPI Client Library.", "author": "Prasad Tammana ", "license": "MIT", diff --git a/src_native/sspi_client.cpp b/src_native/sspi_client.cpp index 6cf56d1..efb29e1 100644 --- a/src_native/sspi_client.cpp +++ b/src_native/sspi_client.cpp @@ -208,7 +208,7 @@ NAN_METHOD(InitializeAsync) NAN_METHOD(EnableDebugLogging) { DebugLog("%ul: Main event loop: EnableDebugLogging NAN_METHOD.\n", GetCurrentThreadId()); - SetDebugLogging(info[0]->BooleanValue()); + SetDebugLogging(Nan::To(info[0]).FromJust()); } // Native implementation of SspiClient surfaced to JavaScript. @@ -286,13 +286,13 @@ class SspiClientObject : public Nan::ObjectWrap { DebugLog("%ul: Main event loop: SspiClientObject::GetNextBlob.\n", GetCurrentThreadId()); - int inBlobBeginOffset = static_cast(info[1]->IntegerValue()); - int inBlobLength = static_cast(info[2]->IntegerValue()); + int inBlobBeginOffset = static_cast(Nan::To(info[1]).FromJust()); + int inBlobLength = static_cast(Nan::To(info[2]).FromJust()); char* inBlob = nullptr; if (inBlobLength > 0) { - inBlob = node::Buffer::Data(info[0]->ToObject()); + inBlob = node::Buffer::Data(info[0]->ToObject(Nan::GetCurrentContext()).ToLocalChecked()); } Nan::Callback* callback = new Nan::Callback(info[3].As()); @@ -309,14 +309,14 @@ class SspiClientObject : public Nan::ObjectWrap { DebugLog("%ul: Main event loop: SspiClientObject::UtEnableCannedResponse.\n", GetCurrentThreadId()); SspiClientObject* sspiClientObject = Nan::ObjectWrap::Unwrap(info.Holder()); - sspiClientObject->m_sspiImpl->UtEnableCannedResponse(info[0]->BooleanValue()); + sspiClientObject->m_sspiImpl->UtEnableCannedResponse(Nan::To(info[0]).FromJust()); } static NAN_METHOD(UtForceCompleteAuth) { DebugLog("%ul: Main event loop: SspiClientObject::UtForceCompleteAuth.\n", GetCurrentThreadId()); SspiClientObject* sspiClientObject = Nan::ObjectWrap::Unwrap(info.Holder()); - sspiClientObject->m_sspiImpl->UtForceCompleteAuth(info[0]->BooleanValue()); + sspiClientObject->m_sspiImpl->UtForceCompleteAuth(Nan::To(info[0]).FromJust()); } // This is a shared pointer because we pass this to