feat: Configureer auth Swagger

This commit is contained in:
Tibo De Peuter 2025-03-09 14:26:04 +01:00
parent e139f59afa
commit 855620cb67
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
5 changed files with 125 additions and 5 deletions

View file

@ -9,14 +9,17 @@ router.get('/config', (req, res) => {
});
router.get('/testAuthenticatedOnly', authenticatedOnly, (req, res) => {
/* #swagger.security = [{ "student": [ ] }, { "teacher": [ ] }] */
res.json({message: "If you see this, you should be authenticated!"});
});
router.get('/testStudentsOnly', studentsOnly, (req, res) => {
/* #swagger.security = [{ "student": [ ] }] */
res.json({message: "If you see this, you should be a student!"});
});
router.get('/testTeachersOnly', teachersOnly, (req, res) => {
/* #swagger.security = [{ "teacher": [ ] }] */
res.json({message: "If you see this, you should be a teacher!"});
});