fix: Auth endpoints in docs
This commit is contained in:
parent
fef714b870
commit
5a9f1ea2f1
3 changed files with 66 additions and 12 deletions
|
@ -8,22 +8,24 @@ const router = express.Router();
|
|||
router.get('/config', handleGetFrontendAuthConfig);
|
||||
|
||||
router.get('/testAuthenticatedOnly', authenticatedOnly, (_req, res) => {
|
||||
/* #swagger.security = [{ "student": [ ] }, { "teacher": [ ] }] */
|
||||
/* #swagger.security = [{ "studentProduction": [ ] }, { "teacherProduction": [ ] }, { "studentStaging": [ ] }, { "teacherStaging": [ ] }, { "studentDev": [ ] }, { "teacherDev": [ ] }] */
|
||||
res.json({ message: 'If you see this, you should be authenticated!' });
|
||||
});
|
||||
|
||||
router.get('/testStudentsOnly', studentsOnly, (_req, res) => {
|
||||
/* #swagger.security = [{ "student": [ ] }] */
|
||||
/* #swagger.security = [{ "studentProduction": [ ] }, { "studentStaging": [ ] }, { "studentDev": [ ] }] */
|
||||
res.json({ message: 'If you see this, you should be a student!' });
|
||||
});
|
||||
|
||||
router.get('/testTeachersOnly', teachersOnly, (_req, res) => {
|
||||
/* #swagger.security = [{ "teacher": [ ] }] */
|
||||
/* #swagger.security = [{ { "teacherProduction": [ ] }, { "teacherStaging": [ ] }, { "teacherDev": [ ] }] */
|
||||
res.json({ message: 'If you see this, you should be a teacher!' });
|
||||
});
|
||||
|
||||
// This endpoint is called by the client when the user has just logged in.
|
||||
// It creates or updates the user entity based on the authentication data the endpoint was called with.
|
||||
router.post('/hello', authenticatedOnly, postHelloHandler);
|
||||
router.post('/hello', authenticatedOnly, /*
|
||||
#swagger.security = [{ "studentProduction": [ ] }, { "teacherProduction": [ ] }, { "studentStaging": [ ] }, { "teacherStaging": [ ] }, { "studentDev": [ ] }, { "teacherDev": [ ] }]
|
||||
*/ postHelloHandler );
|
||||
|
||||
export default router;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue