Skip to content

Commit

Permalink
Merge pull request #30 from pdsinterop/app-launcher
Browse files Browse the repository at this point in the history
Add app launcher
  • Loading branch information
ylebre authored Mar 8, 2021
2 parents 89138be + 54cbc38 commit 48b932c
Show file tree
Hide file tree
Showing 27 changed files with 7,594 additions and 41 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ RUN openssl req -new -x509 -days 365 -nodes \
-subj "/C=RO/ST=Bucharest/L=Bucharest/O=IT/CN=www.example.ro"
RUN apt-get update && apt-get install -yq \
git \
vim
vim \
sudo
WORKDIR /install
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ If you enable this app in your Nextcloud instance, you should
[edit your .htaccess file](https://github.com/solid/test-suite/blob/665824af763ddd5dd7242cbc8b18faad4ac304e3/servers/nextcloud-server/init.sh#L5)
and then test whether https://your-nextcloud-server.com/.well-known/openid-configuration redirects to https://your-nextcloud-server.com/apps/solid/openid.

Also, take the CORS instructions from site.conf and add them to your own webserver configuration.

## Unattended testing
To test whether your server is install correctly, you can run Solid's [webid-provider-tests](https://github.com/solid/webid-provider-tests#against-production) against it.

Expand Down
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3'

services:
pubsub:
build:
context: https://github.com/pdsinterop/php-solid-pubsub-server.git
ports:
- 8080:8080
expose:
- 8080
depends_on:
- nextcloud
nextcloud:
build:
context: ./
dockerfile: Dockerfile
expose:
- 443
ports:
- 443:443
7 changes: 4 additions & 3 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
php console.php maintenance:install --admin-user alice --admin-pass alice123
php console.php status
php console.php app:enable solid
sed -i '61 i\ RewriteRule ^\\.well-known/openid-configuration /apps/solid/openid [R=302,L]' .htaccess
sed -i "25 i\ 1 => 'server'," config/config.php
sed -i "26 i\ 2 => 'thirdparty'," config/config.php
sed -i '61 i\ RewriteRule ^\\.well-known/openid-configuration /apps/solid/openid [R=302,L]' /var/www/html/.htaccess
sed -i "25 i\ 1 => 'server'," /var/www/html/config/config.php
sed -i "26 i\ 2 => 'nextcloud.local'," /var/www/html/config/config.php
sed -i "27 i\ 3 => 'thirdparty'," /var/www/html/config/config.php
echo configured
10 changes: 10 additions & 0 deletions site.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,14 @@
SSLEngine on
SSLCertificateFile "/tls/server.cert"
SSLCertificateKeyFile "/tls/server.key"

Header always set Access-Control-Allow-Origin *
SetEnvIf Origin "(.+)" AccessControlAllowOrigin=$0
Header always set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin

Header always set Access-Control-Allow-Credentials true
Header always set Access-Control-Allow-Headers "*, allow, authorization, content-type, dpop, slug"
Header always set Access-Control-Allow-Methods "GET, PUT, POST, OPTIONS, DELETE, PATCH"
Header always set Accept-Patch: application/sparql-update
Header always set Access-Control-Expose-Headers "Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate, MS-Author-Via"
</VirtualHost>
2 changes: 2 additions & 0 deletions solid/appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@
['name' => 'storage#handleDelete', 'url' => '/@{userId}/storage{path}', 'verb' => 'DELETE', 'requirements' => array('path' => '.+')],
['name' => 'storage#handlePatch', 'url' => '/@{userId}/storage{path}', 'verb' => 'PATCH', 'requirements' => array('path' => '.+')],
['name' => 'storage#handleHead', 'url' => '/@{userId}/storage{path}', 'verb' => 'HEAD', 'requirements' => array('path' => '.+')],

['name' => 'app#appLauncher', 'url' => '/launcher/', 'verb' => 'GET'],
]
];
15 changes: 10 additions & 5 deletions solid/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,27 @@
"description": "A WebID-OIDC Identity Provider, to allow interoperability with SolidProject.org",
"type": "project",
"license": "MIT",
"config": {
"platform": {
"php": "7.2"
}
},
"authors": [
{
"name": "Auke van Slooten"
},
{
"name": "Yvo Brevoort"
}
{
"name": "Yvo Brevoort"
}
],
"require": {
"easyrdf/easyrdf": "^0.9.1",
"pdsinterop/flysystem-rdf": "dev-master",
"pdsinterop/solid-auth": "dev-master",
"pdsinterop/solid-crud": "dev-master",
"pdsinterop/flysystem-nextcloud":"dev-master",
"laminas/laminas-diactoros": "^2.4",
"codercat/jwk-to-pem": "^1.0"
"laminas/laminas-diactoros": "^2.4",
"lcobucci/jwt": "^3.3"
},
"require-dev": {
"phpunit/phpunit": "^5.4"
Expand Down
16 changes: 14 additions & 2 deletions solid/css/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
#hello {
color: red;
li.solid-app {
padding: 10px;
border: 1px solid #ccc;
margin: 5px;
}
.solid-acl {
padding: 2px 6px;
margin-right: 4px;
border: 1px solid #888;
border-radius: 2px;
display: inline-block;
}
.solid-permissions {
margin-bottom: 10px;
}
Loading

0 comments on commit 48b932c

Please sign in to comment.