gregorwolf / hanatrial-auth-proxy

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

Error Handling #7

Closed mlenkeit closed 9 years ago

mlenkeit commented 9 years ago

This PR adds error handling to the authenticate() function. The callback that is passed to the API receives an optional error as the first argument. The second argument is the cookie that was received. The lib code base and the examples have been adjusted.

The change is still backward-compatible. If a callback is passed that only takes one parameter (i.e. the cookie), then the callback will be called with the cookie and no error.

Max