refactor: Move InteractionRoute behaviour to separate class

This commit is contained in:
Joachim Van Herwegen
2021-08-26 11:59:52 +02:00
parent 3542fe29da
commit bbfbfbbce4
11 changed files with 296 additions and 226 deletions

View File

@@ -4,19 +4,19 @@
{
"comment": "Handles all functionality on the forgot password page",
"@id": "urn:solid-server:auth:password:ForgotPasswordRoute",
"@type": "InteractionRoute",
"@type": "BasicInteractionRoute",
"route": "^/forgotpassword/?$",
"viewTemplates": {
"InteractionRoute:_viewTemplates_key": "text/html",
"InteractionRoute:_viewTemplates_value": "@css:templates/identity/email-password/forgot-password.html.ejs"
"BasicInteractionRoute:_viewTemplates_key": "text/html",
"BasicInteractionRoute:_viewTemplates_value": "@css:templates/identity/email-password/forgot-password.html.ejs"
},
"responseTemplates": {
"InteractionRoute:_responseTemplates_key": "text/html",
"InteractionRoute:_responseTemplates_value": "@css:templates/identity/email-password/forgot-password-response.html.ejs"
"BasicInteractionRoute:_responseTemplates_key": "text/html",
"BasicInteractionRoute:_responseTemplates_value": "@css:templates/identity/email-password/forgot-password-response.html.ejs"
},
"controls": {
"InteractionRoute:_controls_key": "forgotPassword",
"InteractionRoute:_controls_value": "/forgotpassword"
"BasicInteractionRoute:_controls_key": "forgotPassword",
"BasicInteractionRoute:_controls_value": "/forgotpassword"
},
"handler": {
"@type": "ForgotPasswordHandler",

View File

@@ -4,16 +4,16 @@
{
"comment": "Handles all functionality on the Login Page",
"@id": "urn:solid-server:auth:password:LoginRoute",
"@type": "InteractionRoute",
"@type": "BasicInteractionRoute",
"route": "^/login/?$",
"prompt": "login",
"viewTemplates": {
"InteractionRoute:_viewTemplates_key": "text/html",
"InteractionRoute:_viewTemplates_value": "@css:templates/identity/email-password/login.html.ejs"
"BasicInteractionRoute:_viewTemplates_key": "text/html",
"BasicInteractionRoute:_viewTemplates_value": "@css:templates/identity/email-password/login.html.ejs"
},
"controls": {
"InteractionRoute:_controls_key": "login",
"InteractionRoute:_controls_value": "/login"
"BasicInteractionRoute:_controls_key": "login",
"BasicInteractionRoute:_controls_value": "/login"
},
"handler": {
"@type": "LoginHandler",

View File

@@ -5,15 +5,15 @@
{
"comment": "Handles the reset password page submission",
"@id": "urn:solid-server:auth:password:ResetPasswordRoute",
"@type": "InteractionRoute",
"@type": "BasicInteractionRoute",
"route": "^/resetpassword(/[^/]*)?$",
"viewTemplates": {
"InteractionRoute:_viewTemplates_key": "text/html",
"InteractionRoute:_viewTemplates_value": "@css:templates/identity/email-password/reset-password.html.ejs"
"BasicInteractionRoute:_viewTemplates_key": "text/html",
"BasicInteractionRoute:_viewTemplates_value": "@css:templates/identity/email-password/reset-password.html.ejs"
},
"responseTemplates": {
"InteractionRoute:_responseTemplates_key": "text/html",
"InteractionRoute:_responseTemplates_value": "@css:templates/identity/email-password/reset-password-response.html.ejs"
"BasicInteractionRoute:_responseTemplates_key": "text/html",
"BasicInteractionRoute:_responseTemplates_value": "@css:templates/identity/email-password/reset-password-response.html.ejs"
},
"handler": {
"@type": "ResetPasswordHandler",

View File

@@ -4,12 +4,12 @@
{
"comment": "Handles confirm requests",
"@id": "urn:solid-server:auth:password:SessionRoute",
"@type": "InteractionRoute",
"@type": "BasicInteractionRoute",
"route": "^/confirm/?$",
"prompt": "consent",
"viewTemplates": {
"InteractionRoute:_viewTemplates_key": "text/html",
"InteractionRoute:_viewTemplates_value": "@css:templates/identity/email-password/confirm.html.ejs"
"BasicInteractionRoute:_viewTemplates_key": "text/html",
"BasicInteractionRoute:_viewTemplates_value": "@css:templates/identity/email-password/confirm.html.ejs"
},
"handler": { "@type": "SessionHttpHandler" }
}

View File

@@ -4,19 +4,19 @@
{
"comment": "Handles all functionality on the register page",
"@id": "urn:solid-server:auth:password:RegistrationRoute",
"@type": "InteractionRoute",
"@type": "BasicInteractionRoute",
"route": "^/register/?$",
"viewTemplates": {
"InteractionRoute:_viewTemplates_key": "text/html",
"InteractionRoute:_viewTemplates_value": "@css:templates/identity/email-password/register.html.ejs"
"BasicInteractionRoute:_viewTemplates_key": "text/html",
"BasicInteractionRoute:_viewTemplates_value": "@css:templates/identity/email-password/register.html.ejs"
},
"responseTemplates": {
"InteractionRoute:_responseTemplates_key": "text/html",
"InteractionRoute:_responseTemplates_value": "@css:templates/identity/email-password/register-response.html.ejs"
"BasicInteractionRoute:_responseTemplates_key": "text/html",
"BasicInteractionRoute:_responseTemplates_value": "@css:templates/identity/email-password/register-response.html.ejs"
},
"controls": {
"InteractionRoute:_controls_key": "register",
"InteractionRoute:_controls_value": "/register"
"BasicInteractionRoute:_controls_key": "register",
"BasicInteractionRoute:_controls_value": "/register"
},
"handler": {
"@type": "RegistrationHandler",