Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
bbdc11d
OIDC Integration - WIP
dmitrizagidulin May 27, 2016
7a0376f
Extract /logout handler to LogoutRequest
dmitrizagidulin Mar 8, 2017
3fb8047
Move Provider initialization logic
dmitrizagidulin Mar 8, 2017
935be63
Handle user manually going to /login without app
dmitrizagidulin Mar 9, 2017
e7b4d0f
Extract auth api logic to oidc-auth-manager
dmitrizagidulin Mar 10, 2017
2921a54
Add --db-path config option
dmitrizagidulin Mar 16, 2017
2b77734
Move oidc-manager test from unit to integration
dmitrizagidulin Mar 16, 2017
5d1b3ae
Refactor config defaults. (webid: true by default)
dmitrizagidulin Mar 16, 2017
6bb6f38
Move default-account-template/ to default-templates/new-account
dmitrizagidulin Mar 16, 2017
6614f23
Move default-email-templates/ to default-templates/emails
dmitrizagidulin Mar 16, 2017
89fe55e
Add --config-path parameter (for default templates and apps)
dmitrizagidulin Mar 17, 2017
d608422
Serve public common/ dir (for shared CSS files, etc)
dmitrizagidulin Mar 17, 2017
73d3c23
Add boostrap.min.css v3.3.7 to common/css/
dmitrizagidulin Mar 17, 2017
4bbf131
Make views/ customizable like templates
dmitrizagidulin Mar 17, 2017
fa2b96c
Rename DiscoverProviderRequest to SelectProviderRequest
dmitrizagidulin Mar 17, 2017
344511c
Move goodbye.html to views
dmitrizagidulin Mar 17, 2017
dea5733
Add a /login default view
dmitrizagidulin Mar 17, 2017
df54a75
Add db configs to speed up integration tests
dmitrizagidulin Mar 17, 2017
18d75da
Display errors on the login form
dmitrizagidulin Mar 20, 2017
9161d11
Pass returnToUrl to /register, refactor
dmitrizagidulin Mar 20, 2017
fa20647
Add /register view
dmitrizagidulin Mar 20, 2017
4220d66
Redirect to original url after account creation
dmitrizagidulin Mar 21, 2017
b27244c
Fix logout handler
dmitrizagidulin Mar 21, 2017
8eaf259
Add a default index.html for server root
dmitrizagidulin Mar 21, 2017
e4d0b8d
Initialize a default index.html for new user accounts
dmitrizagidulin Mar 21, 2017
c6a683d
Bump oidc-auth-manager dep (moved from bcrypt to bcryptjs)
dmitrizagidulin Mar 23, 2017
a5906b8
Pre-populate provider on select-provider view
dmitrizagidulin Mar 27, 2017
478a354
Extract SelectProviderRequest and auth callback code to Auth Manager
dmitrizagidulin Apr 3, 2017
d5f53f0
Add serverUri to startup debug, bump auth manager dep
dmitrizagidulin Apr 5, 2017
0012143
Add tests
dmitrizagidulin Apr 5, 2017
d47d160
Extract template init code to server-config.js
dmitrizagidulin Apr 7, 2017
b21ae11
Refactor createApp()
dmitrizagidulin Apr 7, 2017
04e6c9c
Move acl.js test and resources/ folder to acl-tls
dmitrizagidulin Apr 11, 2017
d935642
Add acl-related OIDC integration tests
dmitrizagidulin Apr 12, 2017
10dccdb
Fix file browser redirect test
dmitrizagidulin Apr 13, 2017
60792fb
Add tests for userIdFromRequest()
dmitrizagidulin Apr 13, 2017
412f488
Add tests for TokenService
dmitrizagidulin Apr 18, 2017
357da35
Refactor TokenService and account manager, add tests
dmitrizagidulin Apr 24, 2017
3b915ff
Implement password reset request and tests
dmitrizagidulin Apr 25, 2017
4ca105e
Implement reset token validation and change password page
dmitrizagidulin Apr 26, 2017
d170650
Add support for --force-user flag for oidc auth
dmitrizagidulin Apr 27, 2017
b49082a
Fix account creation welcome email logic
dmitrizagidulin Apr 27, 2017
182cde7
Remove broken /messages api code
dmitrizagidulin Apr 27, 2017
477c0e0
Remove old account-recovery handler
dmitrizagidulin Apr 27, 2017
b753954
Remove WebID-TLS authentication code
dmitrizagidulin Apr 28, 2017
6b39dcf
Clean up params integration tests
dmitrizagidulin Apr 28, 2017
917cd29
Add tests for PasswordChangeRequest handler
dmitrizagidulin Apr 28, 2017
e2d68fe
Add test for fullUrlForReq()
dmitrizagidulin May 1, 2017
fc0a7b3
Add auth-related docstrings
dmitrizagidulin May 1, 2017
97dac71
Add a fix for utils.debrack() and unit tests
dmitrizagidulin May 1, 2017
e79f025
Set User: response header if authenticated (for legacy compat)
dmitrizagidulin May 4, 2017
9e71eb9
Bump oidc-auth-manager dep to 0.7.1
dmitrizagidulin May 11, 2017
b5f3dc4
Re-add WebID-TLS auth code
dmitrizagidulin May 18, 2017
0786e08
Add a Login with Certificate button to login screen
dmitrizagidulin May 1, 2017
9b19974
Implement Login via WebID-TLS cert local auth strategy
dmitrizagidulin May 22, 2017
eca2d4b
Fix 401 error handling, add tests (#507)
dmitrizagidulin Jun 7, 2017
3659b65
Make ./data the default root folder (#510)
dmitrizagidulin Jun 22, 2017
0b03de7
Move patch handlers to separate files.
RubenVerborgh Jun 22, 2017
a79d19d
Use same patch logic regardless of content type.
RubenVerborgh Jun 22, 2017
acc7151
Use "415 Unsupported Media Type" for unsupported patches.
RubenVerborgh Jun 22, 2017
f55a2a0
Deduplicate graph reading code.
RubenVerborgh Jun 23, 2017
3d05378
Remove incomplete SPARQL PATCH handler.
RubenVerborgh Jun 23, 2017
90c218a
Move patch writing to generic PATCH handler.
RubenVerborgh Jun 23, 2017
fc42bbc
Delegate body parsing to middleware.
RubenVerborgh Jun 23, 2017
c92c6ad
Prettify patch code.
RubenVerborgh Jun 23, 2017
a3f8a77
Refactor SPARQL update patcher with promises.
RubenVerborgh Jun 23, 2017
71c3101
Add preliminary N3 patch support.
RubenVerborgh Jun 26, 2017
aed5b6a
Construct the patch URI through a hash of its contents.
RubenVerborgh Jun 27, 2017
c44c9a1
Clean up SPARQL UPDATE PATCH tests.
RubenVerborgh Jun 27, 2017
4d1e746
Set up new PATCH tests.
RubenVerborgh Jun 27, 2017
f04b5ef
Syntactically and structurally validate patches.
RubenVerborgh Jun 28, 2017
351463d
Enable and test PATCH appending.
RubenVerborgh Jun 29, 2017
338795e
Use single-user setup for PATCH tests.
RubenVerborgh Jun 30, 2017
4c6c275
Test PATCH deletion.
RubenVerborgh Jun 30, 2017
1d55d0e
Test PATCH combined deletion and insertion.
RubenVerborgh Jun 30, 2017
c463d73
Add WHERE support to N3 patches.
RubenVerborgh Jun 30, 2017
d4315b4
Refactor patch handler to perform everything but parsing.
RubenVerborgh Jul 1, 2017
2a895f6
Expose ACL and user ID on request.
RubenVerborgh Jul 1, 2017
9a3597b
Verify read and write permissions for patches.
RubenVerborgh Jul 1, 2017
d108753
Refactor PATCH tests with helper method.
RubenVerborgh Jul 2, 2017
180a114
Support client certificates via X-SSL-Cert header.
RubenVerborgh Jul 13, 2017
97322a0
Make x509 dependency optional.
RubenVerborgh Jul 13, 2017
c541a0a
Add acceptCertificateHeader option.
RubenVerborgh Jul 13, 2017
b0591af
WebID through header doesn't require TLS.
RubenVerborgh Jul 13, 2017
de6012c
Make certificate header name customizable.
RubenVerborgh Jul 13, 2017
60a14ef
Add reverse proxy documentation link.
RubenVerborgh Jul 13, 2017
95701d9
Only set User header with WebID-TLS.
RubenVerborgh Jul 25, 2017
f853711
Reject cookies from third-party applications.
RubenVerborgh Jul 25, 2017
fc3ab8f
Fix missing foaf: prefix in prefs.ttl
dmitrizagidulin Jul 27, 2017
01261ea
Merge branch 'master' into oidc-dev
dmitrizagidulin Aug 8, 2017
c81b51d
Fix merge oddness
dmitrizagidulin Aug 8, 2017
2b4bbe4
Add support for 'request' auth param
dmitrizagidulin Aug 8, 2017
775b46d
Return scope='openid webid' in oidc WWW-Authenticate header response
dmitrizagidulin Aug 8, 2017
da8df9b
Use http-proxy-middleware for CORS proxy.
RubenVerborgh Aug 8, 2017
1696e35
Correct proxy error codes.
RubenVerborgh Aug 8, 2017
1afb00a
Update IP packages.
RubenVerborgh Aug 8, 2017
e61de87
Ensure the host is not a local IP.
RubenVerborgh Aug 8, 2017
883373e
Pass the Host header.
RubenVerborgh Aug 8, 2017
d7dfb16
Expose ACL and user ID on request.
RubenVerborgh Jul 1, 2017
22b2f6c
Test on Node 8.
RubenVerborgh Jul 6, 2017
e785193
Allow additional HTTPS options.
RubenVerborgh Jul 6, 2017
aa0b6b9
Fix ACL TLS test.
RubenVerborgh Jul 6, 2017
5bb0672
Set NODE_TLS_REJECT_UNAUTHORIZED for tests (only).
RubenVerborgh Jul 6, 2017
d9b77a8
Update nock.
RubenVerborgh Aug 8, 2017
01550b0
Move OIDC-specific details out of createApp.
RubenVerborgh Aug 10, 2017
bde91b2
Move TLS-specific details out of createApp.
RubenVerborgh Aug 10, 2017
2e435ff
Make forceUser a separate module.
RubenVerborgh Aug 10, 2017
1f4fd48
Make create-app auth-agnostic.
RubenVerborgh Aug 10, 2017
47697ca
Remove redundant "identified" setting.
RubenVerborgh Aug 10, 2017
e9b5509
Expose request.userId in OIDC handler.
RubenVerborgh Aug 10, 2017
c9467b0
Remove userId from allow handler.
RubenVerborgh Aug 10, 2017
42011d6
Only set User header for TLS.
RubenVerborgh Aug 10, 2017
c2463bc
Rename proxy to corsProxy.
RubenVerborgh Aug 8, 2017
bf3b95c
Add Auth Proxy.
RubenVerborgh Aug 9, 2017
89b6133
Set User header on proxied requests.
RubenVerborgh Aug 9, 2017
2a14bc7
Set Host header on proxied requests.
RubenVerborgh Aug 9, 2017
70f8716
Set Forwarded header on proxied requests.
RubenVerborgh Aug 10, 2017
822d58c
Add authProxy option.
RubenVerborgh Aug 9, 2017
1e6ab20
Set default test timeout to 10 seconds.
RubenVerborgh Aug 9, 2017
0b5a675
Rename main executable to solid.
RubenVerborgh Aug 11, 2017
ae946b0
Add solid-test script.
RubenVerborgh Aug 11, 2017
66e8f8a
Document solid-test executable.
RubenVerborgh Aug 11, 2017
4cf7fd5
Follow Mocha naming conventions.
RubenVerborgh Aug 11, 2017
a1a36c7
Remove specific test commands.
RubenVerborgh Aug 11, 2017
ad09398
Remove clean scripts.
RubenVerborgh Aug 11, 2017
e273032
Add a 'two pods plus external web app' integration test
dmitrizagidulin May 26, 2017
f8db96b
Add support for Proof of Possession tokens, update tests
dmitrizagidulin Aug 14, 2017
0ab52a8
Add token reuse test
dmitrizagidulin Aug 14, 2017
bfcfeca
Merge branch 'master' into dz_oidc
dmitrizagidulin Aug 15, 2017
ff3d3be
Add package-lock.json
dmitrizagidulin Aug 15, 2017
9ba7cb3
Switch to the official oidc issuer link rel value
dmitrizagidulin Aug 15, 2017
dbffa3d
Verify webid provider when extracting webid from claim
dmitrizagidulin Aug 15, 2017
9af2c51
Remove deprecated solid:inbox term from account template
dmitrizagidulin Aug 15, 2017
4bcd7fc
Cache APT packages on Travis CI.
RubenVerborgh Aug 16, 2017
bf83152
Correct certificate-header flag name.
RubenVerborgh Aug 16, 2017
c734cf6
Add --no-reject-unauthorized flag.
RubenVerborgh Aug 16, 2017
b3b755b
Disable rejectUnauthorized on solid-test.
RubenVerborgh Aug 16, 2017
5fe555d
Display error messages on Select Provider page
dmitrizagidulin Aug 16, 2017
560c570
Allow login via TLS with externally hosted WebIDs
dmitrizagidulin Aug 16, 2017
1782ba3
TlsAuthenticator - minor refactor/cleanup
dmitrizagidulin Aug 16, 2017
fb7235d
Add link to issuer discovery spec on error
dmitrizagidulin Aug 17, 2017
b0d543f
Merge remote-tracking branch 'origin/master' into dz_oidc
dmitrizagidulin Aug 18, 2017
eed6c40
Convert checkAccess to promise.
RubenVerborgh Aug 18, 2017
27f6b88
Convert can to promise.
RubenVerborgh Aug 18, 2017
c7ca72b
Move getNearestACL into separate method.
RubenVerborgh Aug 18, 2017
83da96b
Move getPermissionSet into separate method.
RubenVerborgh Aug 18, 2017
554d198
Change accessType into isContainer.
RubenVerborgh Aug 18, 2017
c723009
Pass permission set to checkAccess.
RubenVerborgh Aug 18, 2017
ab00c74
Move resource parameter to constructor.
RubenVerborgh Aug 18, 2017
31d396a
Move all options to constructor.
RubenVerborgh Aug 18, 2017
180de68
Cache the permission set.
RubenVerborgh Aug 18, 2017
0a58ac5
Clean up ACLChecker.
RubenVerborgh Aug 18, 2017
d7a429f
Simplify ACL path algorithm.
RubenVerborgh Aug 18, 2017
3161b68
Indent then and catch.
RubenVerborgh Aug 18, 2017
2b8f18b
Expose the user's permissions through a header.
RubenVerborgh Aug 17, 2017
91c8106
Migrate to Solid vocabulary.
RubenVerborgh Aug 17, 2017
30a57ed
Merge branch 'rv/patch/n3' into dz_oidc
RubenVerborgh Aug 18, 2017
e126aad
Merge branch 'master' into dz_oidc
dmitrizagidulin Aug 18, 2017
6c1938b
Fix rename missed in merge
dmitrizagidulin Aug 18, 2017
82af9ec
Implement fetchDocument without async.
RubenVerborgh Aug 18, 2017
de7b93a
Implement globHandler without async.
RubenVerborgh Aug 21, 2017
67a6b48
Implement CORS proxy test without async.
RubenVerborgh Aug 21, 2017
ace60c7
Implement LDP without async.
RubenVerborgh Aug 21, 2017
d54f958
Remove async dependency.
RubenVerborgh Aug 21, 2017
5746766
Expose WAC-Allow to browser clients.
RubenVerborgh Aug 21, 2017
41da733
Verify presence of test DNS entries. (#549)
RubenVerborgh Aug 25, 2017
34ca3a6
Bump oidc-auth-manager dep to 0.12.0
dmitrizagidulin Aug 28, 2017
9a3022a
Expand error message for unverified web id
dmitrizagidulin Aug 28, 2017
a710be5
Log whole error in error handler
dmitrizagidulin Aug 29, 2017
d0b4749
Do not check for user header in oidc test
dmitrizagidulin Aug 30, 2017
1c09007
Move RS options to oidc-auth-manager initialization
dmitrizagidulin Aug 30, 2017
c8e9109
Add support for external WebIDs registering with username & password
dmitrizagidulin Aug 18, 2017
8b1dc11
Remove solid:inbox from template
dmitrizagidulin Aug 30, 2017
49fb741
Tweak account index page phrasing
dmitrizagidulin Aug 30, 2017
c868ab1
Serve static common/ dir relative to __dirname
dmitrizagidulin Aug 30, 2017
0dfc619
Disable rejectUnauthorized on the WebID-TLS endpoint. (#561)
RubenVerborgh Aug 30, 2017
bc58c7d
Add current hash to redirect. (#562)
RubenVerborgh Aug 30, 2017
cc569a8
Add bootstrap.min.css.map to common/css/
dmitrizagidulin Aug 30, 2017
0d9a472
Fix requirement for additional verification logging in with WebID-TLS
dmitrizagidulin Aug 31, 2017
e7d7ec3
Remove debug overhead on ACL (#566)
RubenVerborgh Aug 31, 2017
928ff50
Update Data Browser html file
dmitrizagidulin Aug 31, 2017
d45d65d
Add a /public folder in new accounts (#569)
RubenVerborgh Sep 1, 2017
bae020f
Rename the idp option into multiuser (#570)
RubenVerborgh Sep 3, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ node_modules/
*.swp
.tern-port
npm-debug.log
config/account-template
config/email-templates
/config/account-template
/config/email-templates
/accounts
/profile
/inbox
/.acl
/config.json
/config/templates
/config/views
/settings
/.db
.nyc_output
coverage
/data
17 changes: 14 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@ sudo: false
language: node_js
node_js:
- "6.0"
- "8.0"
- "node"
env:
- CXX=g++-4.8

cache:
directories:
- node_modules
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
hosts:
- nic.localhost
- tim.localhost
- nicola.localhost

cache:
apt: true
directories:
- node_modules
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- [x] [WebID+TLS Authentication](https://www.w3.org/2005/Incubator/webid/spec/tls/)
- [x] [Real-time live updates](https://github.com/solid/solid-spec#subscribing) (using WebSockets)
- [x] Identity provider for WebID
- [x] Proxy for cross-site data access
- [x] CORS proxy for cross-site data access
- [ ] Group members in ACL
- [x] Email account recovery

Expand Down Expand Up @@ -59,10 +59,14 @@ $ solid start --root path/to/folder --port 8443 --ssl-key path/to/ssl-key.pem --
# Solid server (solid v0.2.24) running on https://localhost:8443/
```

### Running in development environments

Solid requires SSL certificates to be valid, so you cannot use self-signed certificates. To switch off this security feature in development environments, you can use the `bin/solid-test` executable, which unsets the `NODE_TLS_REJECT_UNAUTHORIZED` flag and sets the `rejectUnauthorized` option.

##### How do I get an SSL key and certificate?
You need an SSL certificate you get this from your domain provider or for free from [Let's Encrypt!](https://letsencrypt.org/getting-started/).
You need an SSL certificate from a _certificate authority_, such as your domain provider or [Let's Encrypt!](https://letsencrypt.org/getting-started/).

If you don't have one yet, or you just want to test `solid`, generate a certificate (**DO NOT USE IN PRODUCTION**):
For testing purposes, you can use `bin/solid-test` with a _self-signed_ certificate, generated as follows:
```
$ openssl genrsa 2048 > ../localhost.key
$ openssl req -new -x509 -nodes -sha256 -days 3650 -key ../localhost.key -subj '/CN=*.localhost' > ../localhost.cert
Expand All @@ -88,11 +92,14 @@ $ solid start
Otherwise, if you want to use flags, this would be the equivalent

```bash
$ solid --idp --port 8443 --cert /path/to/cert --key /path/to/key --root ./accounts
$ solid --multiuser --port 8443 --cert /path/to/cert --key /path/to/key --root ./accounts
```

Your users will have a dedicated folder under `./accounts`. Also, your root domain's website will be in `./accounts/yourdomain.tld`. New users can create accounts on `/api/accounts/new` and create new certificates on `/api/accounts/cert`. An easy-to-use sign-up tool is found on `/api/accounts`.

### Running Solid behind a reverse proxy (such as NGINX)
See [Running Solid behind a reverse proxy](https://github.com/solid/node-solid-server/wiki/Running-Solid-behind-a-reverse-proxy).

##### How can send emails to my users with my Gmail?

> To use Gmail you may need to configure ["Allow Less Secure Apps"](https://www.google.com/settings/security/lesssecureapps) in your Gmail account unless you are using 2FA in which case you would have to create an [Application Specific](https://security.google.com/settings/security/apppasswords) password. You also may need to unlock your account with ["Allow access to your Google account"](https://accounts.google.com/DisplayUnlockCaptcha) to use SMTP.
Expand Down Expand Up @@ -150,8 +157,8 @@ $ solid start --help
--owner [value] Set the owner of the storage (overwrites the root ACL file)
--ssl-key [value] Path to the SSL private key in PEM format
--ssl-cert [value] Path to the SSL certificate key in PEM format
--idp Enable multi-user mode (users can sign up for accounts)
--proxy [value] Serve proxy on path (default: '/proxy')
--multiuser Enable multi-user mode
--corsProxy [value] Serve the CORS proxy on this path
--file-browser [value] Url to file browser app (uses Warp by default)
--data-browser Enable viewing RDF resources using a default data browser application (e.g. mashlib)
--suffix-acl [value] Suffix for acl files (default: '.acl')
Expand Down Expand Up @@ -195,7 +202,7 @@ default settings.
mount: '/', // Where to mount Linked Data Platform
webid: false, // Enable WebID+TLS authentication
suffixAcl: '.acl', // Suffix for acl files
proxy: false, // Where to mount the proxy
corsProxy: false, // Where to mount the CORS proxy
errorHandler: false, // function(err, req, res, next) to have a custom error handler
errorPages: false // specify a path where the error pages are
}
Expand Down
66 changes: 53 additions & 13 deletions bin/lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ module.exports = [
// },
{
name: 'root',
help: "Root folder to serve (defaut: './')",
help: "Root folder to serve (default: './data')",
question: 'Path to the folder you want to serve. Default is',
default: './',
default: './data',
prompt: true,
filter: (value) => path.resolve(value)
},
Expand Down Expand Up @@ -46,23 +46,41 @@ module.exports = [
default: '/',
prompt: true
},
{
name: 'config-path',
question: 'Path to the config directory (for example: /etc/solid-server)',
default: './config',
prompt: true
},
{
name: 'db-path',
question: 'Path to the server metadata db directory (for users/apps etc)',
default: './.db',
prompt: true
},
{
name: 'auth',
help: 'Pick an authentication strategy for WebID: `tls` or `oidc`',
question: 'Select authentication strategy',
type: 'list',
choices: [
'WebID-TLS'
'WebID-OpenID Connect'
],
prompt: false,
default: 'WebID-TLS',
default: 'WebID-OpenID Connect',
filter: (value) => {
if (value === 'WebID-TLS') return 'tls'
if (value === 'WebID-OpenID Connect') return 'oidc'
},
when: (answers) => {
return answers.webid
}
},
{
name: 'certificate-header',
question: 'Accept client certificates through this HTTP header (for reverse proxies)',
default: '',
prompt: false
},
{
name: 'useOwner',
question: 'Do you already have a WebID?',
Expand Down Expand Up @@ -98,14 +116,25 @@ module.exports = [
prompt: true
},
{
name: 'idp',
help: 'Enable multi-user mode (users can sign up for accounts)',
question: 'Enable multi-user mode (users can sign up for accounts)',
full: 'allow-signup',
name: 'no-reject-unauthorized',
help: 'Accept self-signed certificates',
flag: true,
default: false,
prompt: false
},
{
name: 'multiuser',
help: 'Enable multi-user mode',
question: 'Enable multi-user mode',
flag: true,
default: false,
prompt: true
},
{
name: 'idp',
help: 'Obsolete; use --multiuser',
prompt: false
},
{
name: 'no-live',
help: 'Disable live support through WebSockets',
Expand All @@ -117,22 +146,33 @@ module.exports = [
// help: 'URI to use as a default app for resources (default: https://linkeddata.github.io/warp/#/list/)'
// },
{
name: 'useProxy',
name: 'useCorsProxy',
help: 'Do you want to have a CORS proxy endpoint?',
flag: true,
prompt: true,
hide: true
},
{
name: 'proxy',
help: 'Serve proxy on path',
help: 'Obsolete; use --corsProxy',
prompt: false
},
{
name: 'corsProxy',
help: 'Serve the CORS proxy on this path',
when: function (answers) {
return answers.useProxy
return answers.useCorsProxy
},
default: '/proxy',
prompt: true
},

{
name: 'authProxy',
help: 'Object with path/server pairs to reverse proxy',
default: {},
prompt: false,
hide: true
},
{
name: 'file-browser',
help: 'Type the URL of default app to use for browsing files (or use default)',
Expand Down
15 changes: 15 additions & 0 deletions bin/solid
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env node

var program = require('commander')
var packageJson = require('../package.json')
var loadInit = require('./lib/init')
var loadStart = require('./lib/start')

program
.version(packageJson.version)

loadInit(program)
loadStart(program)

program.parse(process.argv)
if (program.args.length === 0) program.help()
12 changes: 12 additions & 0 deletions bin/solid-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
COMMAND=$1
ADD_FLAGS=
shift

# Disable rejectUnauthorized when starting the server
if [ "$COMMAND" == "start" ]; then
ADD_FLAGS="--no-reject-unauthorized"
export NODE_TLS_REJECT_UNAUTHORIZED=0
fi

exec `dirname "$0"`/solid $COMMAND $ADD_FLAGS $@
15 changes: 0 additions & 15 deletions bin/solid.js

This file was deleted.

1 change: 1 addition & 0 deletions bin/solid.js
6 changes: 6 additions & 0 deletions common/css/bootstrap.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions common/css/bootstrap.min.css.map

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions config/defaults.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
'use strict'

module.exports = {
'AUTH_METHOD': 'tls',
'DEFAULT_PORT': 8443,
'DEFAULT_URI': 'https://localhost:8443' // default serverUri
'auth': 'oidc',
'localAuth': {
'tls': true,
'password': true
},
'configPath': './config',
'dbPath': './.db',
'port': 8443,
'serverUri': 'https://localhost:8443',
'webid': true,
'dataBrowserPath': 'default'
}
File renamed without changes.
49 changes: 49 additions & 0 deletions default-templates/emails/reset-password.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
'use strict'

/**
* Returns a partial Email object (minus the `to` and `from` properties),
* suitable for sending with Nodemailer.
*
* Used to send a Reset Password email, upon user request
*
* @param data {Object}
*
* @param data.resetUrl {string}
* @param data.webId {string}
*
* @return {Object}
*/
function render (data) {
return {
subject: 'Account password reset',

/**
* Text version
*/
text: `Hi,

We received a request to reset your password for your Solid account, ${data.webId}

To reset your password, click on the following link:

${data.resetUrl}

If you did not mean to reset your password, ignore this email, your password will not change.`,

/**
* HTML version
*/
html: `<p>Hi,</p>

<p>We received a request to reset your password for your Solid account, ${data.webId}</p>

<p>To reset your password, click on the following link:</p>

<p><a href="${data.resetUrl}">${data.resetUrl}</a></p>

<p>If you did not mean to reset your password, ignore this email, your password will not change.</p>
`
}
}

module.exports.render = render
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
function render (data) {
return {
subject: `Welcome to Solid`,
subject: 'Welcome to Solid',

/**
* Text version of the Welcome email
Expand Down
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions default-templates/new-account/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Solid User Profile</title>
<link rel="stylesheet" href="/common/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h3>Solid User Profile</h3>
</div>
<div class="container">
<div class="row">
<div class="col-md-12">
<p style="margin-top: 3em; margin-bottom: 3em;">
Welcome to the account of <code>{{webId}}</code>
</p>
</div>
</div>
</div>
</body>
</html>
Loading