diff --git a/index.js b/index.js index 65e075f..dc326bd 100755 --- a/index.js +++ b/index.js @@ -473,6 +473,17 @@ ready.then((ok) => { const indexDst = join(options.root, 'index.html'); if (existsSync(indexSrc)) copyFileSync(indexSrc, indexDst); + // signin.html is a jspod-owned static page; always-overwrite so + // upgrades to the sign-in flow ship immediately. Pair with a .acl + // granting public read so unauthenticated visitors can reach it + // (mirrors JSS's index.html.acl pattern). + const signinSrc = join(__dirname, 'signin.html'); + const signinDst = join(options.root, 'signin.html'); + if (existsSync(signinSrc)) copyFileSync(signinSrc, signinDst); + const signinAclSrc = join(__dirname, 'signin.html.acl'); + const signinAclDst = join(options.root, 'signin.html.acl'); + if (existsSync(signinAclSrc)) copyFileSync(signinAclSrc, signinAclDst); + const linksSrc = join(__dirname, 'links.jsonld'); const linksDst = join(options.root, 'public', 'links.jsonld'); if (existsSync(linksSrc) && !existsSync(linksDst)) { diff --git a/package.json b/package.json index 21f4e49..99480a2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jspod", - "version": "0.0.16", + "version": "0.0.17", "description": "JavaScript Solid Pod - Just works, batteries included", "type": "module", "main": "index.js", @@ -12,6 +12,8 @@ "data-browser.js", "data-browser.css", "welcome.html", + "signin.html", + "signin.html.acl", "links.jsonld" ], "scripts": { diff --git a/signin.html b/signin.html new file mode 100644 index 0000000..f0eb80c --- /dev/null +++ b/signin.html @@ -0,0 +1,99 @@ + + + + + +Sign in — Solid pod + + + +
+

Signing in…

+

Starting Solid-OIDC handshake with this pod.

+
+Default sign-in: me / me +
+
+ + +
+ + + diff --git a/signin.html.acl b/signin.html.acl new file mode 100644 index 0000000..c0f3d58 --- /dev/null +++ b/signin.html.acl @@ -0,0 +1,23 @@ +{ + "@context": { + "acl": "http://www.w3.org/ns/auth/acl#", + "foaf": "http://xmlns.com/foaf/0.1/" + }, + "@graph": [ + { + "@id": "#public", + "@type": "acl:Authorization", + "acl:agentClass": { + "@id": "foaf:Agent" + }, + "acl:accessTo": { + "@id": "./signin.html" + }, + "acl:mode": [ + { + "@id": "acl:Read" + } + ] + } + ] +} diff --git a/welcome.html b/welcome.html index 962def2..889c8eb 100644 --- a/welcome.html +++ b/welcome.html @@ -35,7 +35,7 @@

Your Solid pod

Running at this server.

- +