diff --git a/lib/server.js b/lib/server.js
index <HASH>..<HASH> 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -48,7 +48,7 @@ var Server = function (server, path, services, wsdl, options) {
       //handle only the required URL path for express server
       server.route(path).all(function (req, res, next) {
         if (typeof self.authorizeConnection === 'function') {
-          if (!self.authorizeConnection(req)) {
+          if (!self.authorizeConnection(req, res)) {
             res.end();
             return;
           }
@@ -60,7 +60,7 @@ var Server = function (server, path, services, wsdl, options) {
       server.removeAllListeners('request');
       server.addListener('request', function (req, res) {
         if (typeof self.authorizeConnection === 'function') {
-          if (!self.authorizeConnection(req)) {
+          if (!self.authorizeConnection(req, res)) {
             res.end();
             return;
           }
Update server.js

Change signature of authorizeConnection to allow changing response parameters, for example, setting status code <I> (Unauthorized)