2021-09-08 16:16:16 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
module.exports = [
|
|
|
|
{
|
|
|
|
method: 'POST',
|
|
|
|
path: '/login',
|
|
|
|
handler: 'authentication.login',
|
2022-10-05 08:21:34 -07:00
|
|
|
config: {
|
|
|
|
auth: false,
|
|
|
|
middlewares: ['admin::rateLimit'],
|
|
|
|
},
|
2021-09-08 16:16:16 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
method: 'POST',
|
|
|
|
path: '/renew-token',
|
|
|
|
handler: 'authentication.renewToken',
|
|
|
|
config: { auth: false },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
method: 'POST',
|
|
|
|
path: '/register-admin',
|
|
|
|
handler: 'authentication.registerAdmin',
|
|
|
|
config: { auth: false },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
method: 'GET',
|
|
|
|
path: '/registration-info',
|
|
|
|
handler: 'authentication.registrationInfo',
|
|
|
|
config: { auth: false },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
method: 'POST',
|
|
|
|
path: '/register',
|
|
|
|
handler: 'authentication.register',
|
|
|
|
config: { auth: false },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
method: 'POST',
|
|
|
|
path: '/forgot-password',
|
|
|
|
handler: 'authentication.forgotPassword',
|
|
|
|
config: { auth: false },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
method: 'POST',
|
|
|
|
path: '/reset-password',
|
|
|
|
handler: 'authentication.resetPassword',
|
|
|
|
config: { auth: false },
|
|
|
|
},
|
2022-12-20 11:58:09 +01:00
|
|
|
{
|
|
|
|
method: 'POST',
|
|
|
|
path: '/logout',
|
|
|
|
handler: 'authentication.logout',
|
|
|
|
config: {
|
|
|
|
policies: ['admin::isAuthenticatedAdmin'],
|
|
|
|
},
|
|
|
|
},
|
2021-09-08 16:16:16 +02:00
|
|
|
];
|