mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Full rework of account management
Complete rewrite of the account management and related systems. Makes the architecture more modular, allowing for easier extensions and configurations.
This commit is contained in:
56
config/identity/interaction/enable/account.json
Normal file
56
config/identity/interaction/enable/account.json
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^6.0.0/components/context.jsonld",
|
||||
"@graph": [
|
||||
{
|
||||
"comment": "Enable account creation."
|
||||
},
|
||||
{
|
||||
"@id": "urn:solid-server:default:InteractionRouteHandler",
|
||||
"@type": "WaterfallHandler",
|
||||
"handlers": [{ "@id": "urn:solid-server:default:AccountRouter" }]
|
||||
},
|
||||
|
||||
{
|
||||
"@id": "urn:solid-server:default:AccountControlHandler",
|
||||
"@type": "ControlHandler",
|
||||
"controls": [{
|
||||
"ControlHandler:_controls_key": "create",
|
||||
"ControlHandler:_controls_value": { "@id": "urn:solid-server:default:AccountRoute" }
|
||||
}]
|
||||
},
|
||||
|
||||
{
|
||||
"comment": "The parts below are specific for password logins, but will not cause issues should password logins be disabled."
|
||||
},
|
||||
{
|
||||
"comment": "Route only used for an HTML page (and its corresponding controls).",
|
||||
"@id": "urn:solid-server:default:RegisterPasswordRoute",
|
||||
"@type": "RelativePathInteractionRoute",
|
||||
"base": { "@id": "urn:solid-server:default:LoginPasswordRoute" },
|
||||
"relativePath": "register/"
|
||||
},
|
||||
{
|
||||
"@id": "urn:solid-server:default:HtmlViewHandler",
|
||||
"@type": "HtmlViewHandler",
|
||||
"templates": [
|
||||
{
|
||||
"@id": "urn:solid-server:default:RegisterPasswordAccountHtml",
|
||||
"@type": "HtmlViewEntry",
|
||||
"filePath": "@css:templates/identity/password/register.html.ejs",
|
||||
"route": { "@id": "urn:solid-server:default:RegisterPasswordRoute" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"@id": "urn:solid-server:default:PasswordHtmlControlHandler",
|
||||
"@type": "ControlHandler",
|
||||
"controls": [
|
||||
{
|
||||
"ControlHandler:_controls_key": "register",
|
||||
"ControlHandler:_controls_value": { "@id": "urn:solid-server:default:RegisterPasswordRoute" }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
43
config/identity/interaction/enable/client-credentials.json
Normal file
43
config/identity/interaction/enable/client-credentials.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^6.0.0/components/context.jsonld",
|
||||
"@graph": [
|
||||
{
|
||||
"comment": "Enable client credentials creation."
|
||||
},
|
||||
{
|
||||
"@id": "urn:solid-server:default:InteractionRouteHandler",
|
||||
"@type": "WaterfallHandler",
|
||||
"handlers": [{ "@id": "urn:solid-server:default:AccountClientCredentialsRouter" }]
|
||||
},
|
||||
|
||||
{
|
||||
"@id": "urn:solid-server:default:AccountControlHandler",
|
||||
"@type": "ControlHandler",
|
||||
"controls": [{
|
||||
"ControlHandler:_controls_key": "clientCredentials",
|
||||
"ControlHandler:_controls_value": { "@id": "urn:solid-server:default:AccountClientCredentialsRoute" }
|
||||
}]
|
||||
},
|
||||
|
||||
{
|
||||
"@id": "urn:solid-server:default:HtmlViewHandler",
|
||||
"@type": "HtmlViewHandler",
|
||||
"templates": [{
|
||||
"@id": "urn:solid-server:default:CreateClientCredentialsHtml",
|
||||
"@type": "HtmlViewEntry",
|
||||
"filePath": "@css:templates/identity/account/create-client-credentials.html.ejs",
|
||||
"route": { "@id": "urn:solid-server:default:AccountClientCredentialsRoute" }
|
||||
}]
|
||||
},
|
||||
{
|
||||
"ControlHandler:_controls_value": {
|
||||
"@id": "urn:solid-server:default:AccountHtmlControlHandler",
|
||||
"@type": "ControlHandler",
|
||||
"controls": [{
|
||||
"ControlHandler:_controls_key": "createClientCredentials",
|
||||
"ControlHandler:_controls_value": { "@id": "urn:solid-server:default:AccountClientCredentialsRoute" }
|
||||
}]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
52
config/identity/interaction/enable/password.json
Normal file
52
config/identity/interaction/enable/password.json
Normal file
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^6.0.0/components/context.jsonld",
|
||||
"@graph": [
|
||||
{
|
||||
"comment": "Enable creating email/password combinations as a login mechanism."
|
||||
},
|
||||
{
|
||||
"@id": "urn:solid-server:default:ControlHandler",
|
||||
"@type": "ControlHandler",
|
||||
"controls": [
|
||||
{
|
||||
"ControlHandler:_controls_key": "password",
|
||||
"ControlHandler:_controls_value": {
|
||||
"comment": "All controls associated with the password login method.",
|
||||
"@id": "urn:solid-server:default:PasswordControlHandler",
|
||||
"@type": "ControlHandler",
|
||||
"controls": []
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"comment": "Adds a link to the login page of this auth method to the list that contains all options",
|
||||
"@id": "urn:solid-server:default:LoginHandler",
|
||||
"@type": "ControlHandler",
|
||||
"controls": [
|
||||
{
|
||||
"ControlHandler:_controls_key": "Email/password combination",
|
||||
"ControlHandler:_controls_value": { "@id": "urn:solid-server:default:LoginPasswordRoute" }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"@id": "urn:solid-server:default:HtmlControlHandler",
|
||||
"@type": "ControlHandler",
|
||||
"controls": [
|
||||
{
|
||||
"ControlHandler:_controls_key": "password",
|
||||
"ControlHandler:_controls_value": {
|
||||
"comment": "Contains the controls linking to all HTML pages related to password authentication.",
|
||||
"@id": "urn:solid-server:default:PasswordHtmlControlHandler",
|
||||
"@type": "ControlHandler",
|
||||
"controls": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
44
config/identity/interaction/enable/pod.json
Normal file
44
config/identity/interaction/enable/pod.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^6.0.0/components/context.jsonld",
|
||||
"@graph": [
|
||||
{
|
||||
"comment": "Enable pod creation."
|
||||
},
|
||||
|
||||
{
|
||||
"@id": "urn:solid-server:default:InteractionRouteHandler",
|
||||
"@type": "WaterfallHandler",
|
||||
"handlers": [
|
||||
{ "@id": "urn:solid-server:default:AccountPodRouter" }
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"@id": "urn:solid-server:default:AccountControlHandler",
|
||||
"@type": "ControlHandler",
|
||||
"controls": [{
|
||||
"ControlHandler:_controls_key": "pod",
|
||||
"ControlHandler:_controls_value": { "@id": "urn:solid-server:default:AccountPodRoute" }
|
||||
}]
|
||||
},
|
||||
|
||||
{
|
||||
"@id": "urn:solid-server:default:HtmlViewHandler",
|
||||
"@type": "HtmlViewHandler",
|
||||
"templates": [{
|
||||
"@id": "urn:solid-server:default:CreatePodHtml",
|
||||
"@type": "HtmlViewEntry",
|
||||
"filePath": "@css:templates/identity/account/create-pod.html.ejs",
|
||||
"route": { "@id": "urn:solid-server:default:AccountPodRoute" }
|
||||
}]
|
||||
},
|
||||
{
|
||||
"@id": "urn:solid-server:default:AccountHtmlControlHandler",
|
||||
"@type": "ControlHandler",
|
||||
"controls": [{
|
||||
"ControlHandler:_controls_key": "createPod",
|
||||
"ControlHandler:_controls_value": { "@id": "urn:solid-server:default:AccountPodRoute" }
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
44
config/identity/interaction/enable/webid.json
Normal file
44
config/identity/interaction/enable/webid.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^6.0.0/components/context.jsonld",
|
||||
"@graph": [
|
||||
{
|
||||
"comment": "Enable linking WebIDs to an account."
|
||||
},
|
||||
|
||||
{
|
||||
"@id": "urn:solid-server:default:InteractionRouteHandler",
|
||||
"@type": "WaterfallHandler",
|
||||
"handlers": [
|
||||
{ "@id": "urn:solid-server:default:AccountWebIdRouter" }
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"@id": "urn:solid-server:default:AccountControlHandler",
|
||||
"@type": "ControlHandler",
|
||||
"controls": [{
|
||||
"ControlHandler:_controls_key": "webId",
|
||||
"ControlHandler:_controls_value": { "@id": "urn:solid-server:default:AccountWebIdRoute" }
|
||||
}]
|
||||
},
|
||||
|
||||
{
|
||||
"@id": "urn:solid-server:default:HtmlViewHandler",
|
||||
"@type": "HtmlViewHandler",
|
||||
"templates": [{
|
||||
"@id": "urn:solid-server:default:LinkWebIdHtml",
|
||||
"@type": "HtmlViewEntry",
|
||||
"filePath": "@css:templates/identity/account/link-webid.html.ejs",
|
||||
"route": { "@id": "urn:solid-server:default:AccountWebIdRoute" }
|
||||
}]
|
||||
},
|
||||
{
|
||||
"@id": "urn:solid-server:default:AccountHtmlControlHandler",
|
||||
"@type": "ControlHandler",
|
||||
"controls": [{
|
||||
"ControlHandler:_controls_key": "linkWebId",
|
||||
"ControlHandler:_controls_value": { "@id": "urn:solid-server:default:AccountWebIdRoute" }
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user