bug-hunters / oas3-tools

A Node.js and browser module that provides tooling around Swagger.
MIT License
27 stars 50 forks source link

Security functions not working #32

Closed camclark85 closed 3 years ago

camclark85 commented 3 years ago

I'm unable to get my JWT validation function to execute.

I've tried both this:

var options = {
    oasSecurity: true,
    securityFile: {
        Bearer: verifyToken
    },
    routing: {
        controllers: path.join(__dirname, './controllers'),
    }
};

and this:

var options = {
    oasSecurity: true,
    routing: {
        securityFile: {
            Bearer: verifyToken
        },
        controllers: path.join(__dirname, './controllers'),
    }
};

Is this a known issue or am I missing something here? The routing is working fine otherwise but I've been trying everything I can think of and I just can't get the security authorization working.

camclark85 commented 3 years ago

My bad I was looking at the documentation from oas-tools.