2020-04-22 21:56:39 +00:00
|
|
|
const mfa_routes = {
|
|
|
|
prefix: '/auth/mfa',
|
|
|
|
|
|
|
|
middleware: [
|
2020-05-22 14:29:13 +00:00
|
|
|
'auth:UserOnly',
|
2020-04-22 21:56:39 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
get: {
|
|
|
|
'/setup': [
|
2020-05-04 01:16:54 +00:00
|
|
|
['middleware::auth:RequireTrust', { scope: 'mfa.enable' }],
|
2020-04-22 21:56:39 +00:00
|
|
|
'controller::auth:MFA.setup',
|
|
|
|
],
|
|
|
|
'/challenge': [
|
|
|
|
'controller::auth:MFA.challenge',
|
|
|
|
],
|
2020-05-04 01:16:54 +00:00
|
|
|
'/disable': [
|
|
|
|
'controller::auth:MFA.get_disable',
|
|
|
|
],
|
|
|
|
'/disable/process': [
|
|
|
|
['middleware::auth:RequireTrust', { scope: 'mfa.disable' }],
|
|
|
|
'controller::auth:MFA.do_disable',
|
|
|
|
],
|
2020-05-30 22:21:47 +00:00
|
|
|
'/recovery': [
|
|
|
|
'controller::auth:MFA.get_recovery',
|
|
|
|
],
|
2020-04-22 21:56:39 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
post: {
|
|
|
|
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = exports = mfa_routes
|