mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Support content negotiation for IDP requests
This commit is contained in:
@@ -23,26 +23,7 @@
|
||||
"idpPath": "/idp",
|
||||
"requestParser": { "@id": "urn:solid-server:default:RequestParser" },
|
||||
"providerFactory": { "@id": "urn:solid-server:default:IdentityProviderFactory" },
|
||||
"templateHandler": {
|
||||
"@type": "TemplateHandler",
|
||||
"responseWriter": { "@id": "urn:solid-server:default:ResponseWriter" },
|
||||
"templateEngine": {
|
||||
"comment": "Renders the specific page and embeds it into the main HTML body.",
|
||||
"@type": "ChainedTemplateEngine",
|
||||
"renderedName": "htmlBody",
|
||||
"engines": [
|
||||
{
|
||||
"comment": "Will be called with specific interaction templates to generate HTML snippets.",
|
||||
"@type": "EjsTemplateEngine"
|
||||
},
|
||||
{
|
||||
"comment": "Will embed the result of the first engine into the main HTML template.",
|
||||
"@type": "EjsTemplateEngine",
|
||||
"template": "@css:templates/main.html.ejs"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"converter": { "@id": "urn:solid-server:default:RepresentationConverter" },
|
||||
"interactionCompleter": {
|
||||
"comment": "Responsible for finishing OIDC interactions.",
|
||||
"@type": "InteractionCompleter",
|
||||
|
||||
@@ -6,8 +6,14 @@
|
||||
"@id": "urn:solid-server:auth:password:ForgotPasswordRoute",
|
||||
"@type": "InteractionRoute",
|
||||
"route": "^/forgotpassword/?$",
|
||||
"viewTemplate": "@css:templates/identity/email-password/forgot-password.html.ejs",
|
||||
"responseTemplate": "@css:templates/identity/email-password/forgot-password-response.html.ejs",
|
||||
"viewTemplates": {
|
||||
"InteractionRoute:_viewTemplates_key": "text/html",
|
||||
"InteractionRoute:_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"
|
||||
},
|
||||
"handler": {
|
||||
"@type": "ForgotPasswordHandler",
|
||||
"args_accountStore": { "@id": "urn:solid-server:auth:password:AccountStore" },
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
"@type": "InteractionRoute",
|
||||
"route": "^/login/?$",
|
||||
"prompt": "default",
|
||||
"viewTemplate": "@css:templates/identity/email-password/login.html.ejs",
|
||||
"viewTemplates": {
|
||||
"InteractionRoute:_viewTemplates_key": "text/html",
|
||||
"InteractionRoute:_viewTemplates_value": "@css:templates/identity/email-password/login.html.ejs"
|
||||
},
|
||||
"handler": {
|
||||
"@type": "LoginHandler",
|
||||
"accountStore": { "@id": "urn:solid-server:auth:password:AccountStore" }
|
||||
|
||||
@@ -7,8 +7,14 @@
|
||||
"@id": "urn:solid-server:auth:password:ResetPasswordRoute",
|
||||
"@type": "InteractionRoute",
|
||||
"route": "^/resetpassword(/[^/]*)?$",
|
||||
"viewTemplate": "@css:templates/identity/email-password/reset-password.html.ejs",
|
||||
"responseTemplate": "@css:templates/identity/email-password/reset-password-response.html.ejs",
|
||||
"viewTemplates": {
|
||||
"InteractionRoute:_viewTemplates_key": "text/html",
|
||||
"InteractionRoute:_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"
|
||||
},
|
||||
"handler": {
|
||||
"@type": "ResetPasswordHandler",
|
||||
"accountStore": { "@id": "urn:solid-server:auth:password:AccountStore" }
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
"@type": "InteractionRoute",
|
||||
"route": "^/confirm/?$",
|
||||
"prompt": "consent",
|
||||
"viewTemplate": "@css:templates/identity/email-password/confirm.html.ejs",
|
||||
"viewTemplates": {
|
||||
"InteractionRoute:_viewTemplates_key": "text/html",
|
||||
"InteractionRoute:_viewTemplates_value": "@css:templates/identity/email-password/confirm.html.ejs"
|
||||
},
|
||||
"handler": { "@type": "SessionHttpHandler" }
|
||||
}
|
||||
]
|
||||
|
||||
@@ -6,8 +6,14 @@
|
||||
"@id": "urn:solid-server:auth:password:RegistrationRoute",
|
||||
"@type": "InteractionRoute",
|
||||
"route": "^/register/?$",
|
||||
"viewTemplate": "@css:templates/identity/email-password/register.html.ejs",
|
||||
"responseTemplate": "@css:templates/identity/email-password/register-response.html.ejs",
|
||||
"viewTemplates": {
|
||||
"InteractionRoute:_viewTemplates_key": "text/html",
|
||||
"InteractionRoute:_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"
|
||||
},
|
||||
"handler": {
|
||||
"@type": "RegistrationHandler",
|
||||
"args_baseUrl": { "@id": "urn:solid-server:default:variable:baseUrl" },
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld",
|
||||
"@graph": [
|
||||
{
|
||||
"comment": "Uses the JSON data as parameters for a template.",
|
||||
"@id": "urn:solid-server:default:DynamicJsonToTemplateConverter",
|
||||
"@type": "DynamicJsonToTemplateConverter",
|
||||
"templateEngine": {
|
||||
"comment": "Renders the specific page and embeds it into the main HTML body.",
|
||||
"@type": "ChainedTemplateEngine",
|
||||
"renderedName": "htmlBody",
|
||||
"engines": [
|
||||
{
|
||||
"comment": "Will be called with specific templates to generate HTML snippets.",
|
||||
"@type": "EjsTemplateEngine"
|
||||
},
|
||||
{
|
||||
"comment": "Will embed the result of the first engine into the main HTML template.",
|
||||
"@type": "EjsTemplateEngine",
|
||||
"template": "@css:templates/main.html.ejs"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^1.0.0/components/context.jsonld",
|
||||
"import": [
|
||||
"files-scs:config/util/representation-conversion/converters/content-type-replacer.json",
|
||||
"files-scs:config/util/representation-conversion/converters/dynamic-json-template.json",
|
||||
"files-scs:config/util/representation-conversion/converters/errors.json",
|
||||
"files-scs:config/util/representation-conversion/converters/markdown.json",
|
||||
"files-scs:config/util/representation-conversion/converters/quad-to-rdf.json",
|
||||
@@ -15,6 +16,7 @@
|
||||
"handlers": [
|
||||
{ "@id": "urn:solid-server:default:DefaultUiConverter" },
|
||||
{ "@id": "urn:solid-server:default:MarkdownToHtmlConverter" },
|
||||
{ "@id": "urn:solid-server:default:DynamicJsonToTemplateConverter" },
|
||||
{
|
||||
"@type": "IfNeededConverter",
|
||||
"comment": "Only continue converting if the requester cannot accept the available content type"
|
||||
|
||||
Reference in New Issue
Block a user