me-ventures / microservice-toolkit

MIT License
3 stars 1 forks source link

provide security functions for swagger security initialisation #4

Open EvaLok opened 7 years ago

EvaLok commented 7 years ago

currently user has to do that manually; should happen automagically

currently done this way:

var options = config.get('customSwagger');
options.security = {
    apiKeySecurity: function (req, authOrSecDef, scopesOrApiKey, cb) {
        // auth stuff
    }
};

http.enableSwagger(swaggerDoc, options);