From 638f7797ed1c4242aa43cf637645063fe9b4b1d6 Mon Sep 17 00:00:00 2001 From: saravahdatipour Date: Mon, 2 Dec 2024 15:34:42 +0100 Subject: [PATCH 1/2] get public key from the irma server itself --- docker-compose.yml | 3 +-- www/config.php | 1 - www/php/verifysession.php | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index bde9c6b..1299788 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,6 @@ services: environment: - IRMA_SERVER_URL=http://irma:8088 - ROOT_DIR=/app/data/ - - IRMA_SERVER_PUBLICKEY=demo-publickey.pem # - IRMA_SERVER_API_TOKEN=mysecrettoken - IRMATUBE_CREDENTIAL_ID=irma-demo.IRMATube.member volumes: @@ -21,7 +20,7 @@ services: build: https://github.com/privacybydesign/irmago.git ports: - "8088:8088" - command: server --no-tls --no-auth --jwt-privkey-file /data/demo-privkey.pem # add --url http://your--network-ip:8088 if your irma mobile app cannot talk to your localhost + command: server --no-tls --no-auth --jwt-privkey-file /data/demo-privkey.pem # add --url http://your--network-ip:8088 if your irma mobile app cannot talk to your localhost networks: - app-network volumes: diff --git a/www/config.php b/www/config.php index 4598966..dd4a150 100644 --- a/www/config.php +++ b/www/config.php @@ -4,7 +4,6 @@ // URL and JWT public key of your IRMA server, also include your access token if enabled on your server define('IRMA_SERVER_URL',getenv('IRMA_SERVER_URL') ?: 'http://localhost:8088'); -define('IRMA_SERVER_PUBLICKEY',getenv('IRMA_SERVER_PUBLICKEY')?: 'demo-publickey.pem'); define('IRMA_SERVER_API_TOKEN', getenv('IRMA_SERVER_API_TOKEN')?: ''); define('IRMATUBE_CREDENTIAL_ID',getenv('IRMATUBE_CREDENTIAL_ID') ?: 'irma-demo.IRMATube.member'); diff --git a/www/php/verifysession.php b/www/php/verifysession.php index 03ac46f..aef1a09 100644 --- a/www/php/verifysession.php +++ b/www/php/verifysession.php @@ -25,8 +25,7 @@ exit; } -$jwt_pk = file_get_contents(ROOT_DIR . IRMA_SERVER_PUBLICKEY); - +$jwt_pk = file_get_contents(IRMA_SERVER_URL . './publickey'); $token = $data['token']; $videoid = $data['videoid']; From fe5d26db56d344ef2a94ffafe8fc8e05ad5526f8 Mon Sep 17 00:00:00 2001 From: saravahdatipour Date: Mon, 2 Dec 2024 16:31:27 +0100 Subject: [PATCH 2/2] minor fixes --- data/videos/were-the-millers.json | 2 +- www/php/verifysession.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/videos/were-the-millers.json b/data/videos/were-the-millers.json index 52eb983..6cda949 100644 --- a/data/videos/were-the-millers.json +++ b/data/videos/were-the-millers.json @@ -1,4 +1,4 @@ { "ageRestriction": 12, - "youtubeId": "=0Vsy5KzsieQ" + "youtubeId": "0Vsy5KzsieQ" } \ No newline at end of file diff --git a/www/php/verifysession.php b/www/php/verifysession.php index aef1a09..78d8d33 100644 --- a/www/php/verifysession.php +++ b/www/php/verifysession.php @@ -25,7 +25,7 @@ exit; } -$jwt_pk = file_get_contents(IRMA_SERVER_URL . './publickey'); +$jwt_pk = file_get_contents(IRMA_SERVER_URL . '/publickey'); $token = $data['token']; $videoid = $data['videoid'];