I have tried several methods to add a basic API key authorization to Swagger (express swagger). Below is the relevant info from my manifest.

```
{
  ...
  "main": "app.js",
  "dependencies": {
    "express": "^4.12.3",
    "swagger-express-mw": "^0.1.0"
  },
  ...
}

```

I believe I have registered the security definitions in the YAML configuration.

```
swagger: "2.0"
info:
  ...

# Set up security for the API
securityDefinitions:
  defaultApiKey:
    type: apiKey
    in: header
    name: defaultApiKey

security:
    - defaultApiKey: []

```

To finish this configuration I thought I would only need to register the middleware in the SwaggerExpress.create() function. Below is my entire app.js as it currently stands.

```
'use strict';

var SwaggerExpress = require('swagger-express-mw');
var app = require('express')();
module.exports = app; // for testing

var config = {
  appRoot: __dirname // required config
};

SwaggerExpress.create(config, function(err, swaggerExpress) {
  if (err) { throw err; }

  // Serve the Swagger documents and SwaggerUi
  app.use(swaggerExpress.runner.swaggerTools.swaggerUi());

  // Install security
  app.use(swaggerExpress.swaggerSecurity({
    defaultApiKey: function(req, def, scopes, callback) {
      console.log("hit");
    }
  }));

  // install middleware
  swaggerExpress.register(app);

  var port = process.env.PORT || 10010;
  app.listen(port);
});

```

When I attempt to use this I see the following:

```
Error initializing middleware
TypeError: swaggerExpress.swaggerSecurity is not a function

```

I have tried configuring this a few different ways with no success. Did I properly define the API key in YAML and if so what should I do to register the API key handler in my app.js file?