Add MFA support

This commit is contained in:
garrettmills
2020-04-22 16:56:39 -05:00
parent d68d5141c8
commit e3ecfb0d37
30 changed files with 802 additions and 75 deletions

View File

@@ -5,7 +5,7 @@
* The general structure is as follows:
*
* /auth/{provider name}/{action}
*
* Individual providers may be interacted with individually, therefore:
*
* /auth/flitter/register
@@ -49,7 +49,7 @@ const index = {
'/:provider/logout': [
'middleware::auth:ProviderRoute',
'middleware::auth:UserOnly',
'middleware::auth:DMZOnly',
'controller::auth:Forms.logout_provider_clean_session',
// Note, this separation is between when the auth action has happened properly
@@ -60,7 +60,7 @@ const index = {
],
'/logout': [
'middleware::auth:ProviderRoute',
'middleware::auth:UserOnly',
'middleware::auth:DMZOnly',
'controller::auth:Forms.logout_provider_clean_session',
'controller::auth:Forms.logout_provider_present_success',
],
@@ -94,16 +94,15 @@ const index = {
'controller::auth:Forms.login_provider_authenticate_user',
'controller::auth:Forms.login_provider_present_success',
],
'/:provider/logout': [
'middleware::auth:ProviderRoute',
'middleware::auth:UserOnly',
'middleware::auth:DMZOnly',
'controller::auth:Forms.logout_provider_clean_session',
'controller::auth:Forms.logout_provider_present_success',
],
'/logout': [
'middleware::auth:ProviderRoute',
'middleware::auth:UserOnly',
'middleware::auth:DMZOnly',
'controller::auth:Forms.logout_provider_clean_session',
'controller::auth:Forms.logout_provider_present_success',
],

View File

@@ -0,0 +1,24 @@
const mfa_routes = {
prefix: '/auth/mfa',
middleware: [
],
get: {
'/setup': [
'middleware::auth:UserOnly',
'controller::auth:MFA.setup',
],
'/challenge': [
'middleware::auth:DMZOnly',
'controller::auth:MFA.challenge',
],
},
post: {
},
}
module.exports = exports = mfa_routes