You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
const { validApiKey } = require("../../../utils/middleware/validApiKey");
function apiAuthEndpoints(app) { if (!app) return;
app.get("/v1/auth", [validApiKey], (_, response) => { /* #swagger.tags = ['Authentication'] #swagger.description = 'Verify the attached Authentication header contains a valid API token.' #swagger.responses[200] = { description: 'Valid auth token was found.', content: { "application/json": { schema: { type: 'object', example: { authenticated: true, } } } } } #swagger.responses[403] = { schema: { "$ref": "#/definitions/InvalidAPIKey" } } */ response.status(200).json({ authenticated: true }); });}
module.exports = { apiAuthEndpoints };
|