CoreID/app/routing/routers/auth/mfa.routes.js

31 lines
646 B
JavaScript
Raw Normal View History

2020-04-22 21:56:39 +00:00
const mfa_routes = {
prefix: '/auth/mfa',
middleware: [
'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-04-22 21:56:39 +00:00
},
post: {
},
}
module.exports = exports = mfa_routes