gregorwolf / hanatrial-auth-proxy

SAP HANA Cloud Authentication Proxy for HANA XS
Apache License 2.0
22 stars 8 forks source link

hanatrial-auth-proxy not working #8

Closed dhess54 closed 9 years ago

dhess54 commented 9 years ago

Hello,

This new release of the components do not match the SAP HANA Academy videos which is based on the previous version. Trying to setup the HCP Social Media demo. Can you please explain how to use this latest version. See error msg below.

C:\Users\I825316\Downloads\hanatrial-auth-proxy-master>node server-basic-auth.js

module.js:338 throw err; ^ Error: Cannot find module './../lib/hana-saml' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object. (C:\Users\I825316\Downloads\hanatrial-auth-proxy-maste r\server-basic-auth.js:6:16) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10)

PhilipMugglestone commented 9 years ago

I've added a comment to the SAP HANA Academy video in question as follows:

IMPORTANT UPDATE April 1st 2015 (not an April Fool!) The hanatrial-auth-proxy was recently updated so the process shown in the video has changed slightly. Simply use "npm install" (no need to install cheerio and querystring explicitly anymore). You'll also find that the config.js and server-basic-auth files have moved to the examples subfolder. You still need to verify the "host" option in config.js matches your HANA XS instance. To start to the proxy use "node examples/server-basic-auth.js" from the main hanatrial-auth-proxy folder.

https://www.youtube.com/watch?v=fhtbO532DiI&list=PLkzo92owKnVw1SONF9PQy2S0IgX8ICL9G&index=23

dhess54 commented 9 years ago

It worked perfect! Not an April Fool.

Thanks!

dhess54 commented 9 years ago

Hello, I might of spoke to soon. I get the proxy to authenticate. I test the connection with my browser and I get the correct results back. But right after the results are returned to the page the proxy drops and throws an error. Something about “name" and "value" are required for setHeader. (See below)

SAP HANA Cloud Trial Authentication Proxy for HANA XS Services ready: http://localhost:7891

GET /i825316trial/dev/live3/services.xsodata/Clusters?$format=json Get new session cookie GET /favicon.ico _http_outgoing.js:333 throw new Error('"name" and "value" are required for setHeader().'); ^ Error: "name" and "value" are required for setHeader(). at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:333:11) at Request._callback (C:\Users\I825316\Downloads\hanatrial-auth-proxy-master \examples\server-basic-auth.js:85:18) at Request.self.callback (C:\Users\I825316\Downloads\hanatrial-auth-proxy-master\node_modules\request\request.js:360:22) at Request.emit (events.js:110:17) at Request. (C:\Users\I825316\Downloads\hanatrial-auth-proxy-master\node_modules\request\request.js:1202:14) at Request.emit (events.js:129:20) at IncomingMessage. (C:\Users\I825316\Downloads\hanatrial-auth-proxy-master\node_modules\request\request.js:1150:12) at IncomingMessage.emit (events.js:129:20) at _stream_readable.js:908:16 at process._tickCallback (node.js:355:11)

C:\Users\I825316\Downloads\hanatrial-auth-proxy-master>

gregorwolf commented 9 years ago

That is a known problem reported in issue #4 which needs to be fixed. Pull requests are welcome.