{"action":"opened","issue":{"url":"https://api.github.com/repos/vpulim/node-soap/issues/583","labels_url":"https://api.github.com/repos/vpulim/node-soap/issues/583/labels{/name}","comments_url":"https://api.github.com/repos/vpulim/node-soap/issues/583/comments","events_url":"https://api.github.com/repos/vpulim/node-soap/issues/583/events","html_url":"https://github.com/vpulim/node-soap/issues/583","id":59617712,"number":583,"title":"Invalid docs for `server.authorizeConnection()`","user":{"login":"sommestad","id":61638,"avatar_url":"https://avatars.githubusercontent.com/u/61638?v=3","gravatar_id":"","url":"https://api.github.com/users/sommestad","html_url":"https://github.com/sommestad","followers_url":"https://api.github.com/users/sommestad/followers","following_url":"https://api.github.com/users/sommestad/following{/other_user}","gists_url":"https://api.github.com/users/sommestad/gists{/gist_id}","starred_url":"https://api.github.com/users/sommestad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sommestad/subscriptions","organizations_url":"https://api.github.com/users/sommestad/orgs","repos_url":"https://api.github.com/users/sommestad/repos","events_url":"https://api.github.com/users/sommestad/events{/privacy}","received_events_url":"https://api.github.com/users/sommestad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-03T09:46:35Z","updated_at":"2015-03-03T09:46:35Z","closed_at":null,"body":"The docs for (server.authorizeConnection)[https://github.com/vpulim/node-soap#server-connection-authorization] state that the `req` object is being provided to the function. \r\n\r\nHowever, looking at the code, this is incorrect:\r\n\r\n```js\r\n// lib/server.js:41\r\nif (typeof self.authorizeConnection === 'function') {\r\n  if (!self.authorizeConnection(req.connection.remoteAddress)) {\r\n  \tres.end();\r\n    return;\r\n  }\r\n}\r\n```\r\n\r\nIt would be a lot better if the `req` was actually provided, rather than just providing the `removeAddress`, since that would enable more flexibility in terms of setting up authentication (e.g. if you'd want a separate unauthenticated path for health checks on the same server, `/ping`)."}}