From 4216f9d5a23d56c7afaae86e91a27b713ccd9a12 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Mon, 18 Sep 2023 14:59:30 +0000 Subject: [PATCH 01/35] add dockerfile and dependencies --- Dockerfile.nginx | 2 ++ Dockerfile.php | 12 ++++++++++++ composer.json | 5 +++++ composer_install.sh | 17 +++++++++++++++++ default.conf | 24 ++++++++++++++++++++++++ 5 files changed, 60 insertions(+) create mode 100644 Dockerfile.nginx create mode 100644 Dockerfile.php create mode 100644 composer.json create mode 100644 composer_install.sh create mode 100644 default.conf diff --git a/Dockerfile.nginx b/Dockerfile.nginx new file mode 100644 index 0000000..ec9d167 --- /dev/null +++ b/Dockerfile.nginx @@ -0,0 +1,2 @@ +FROM nginx:latest +COPY default.conf /etc/nginx/conf.d/default.conf \ No newline at end of file diff --git a/Dockerfile.php b/Dockerfile.php new file mode 100644 index 0000000..58918bb --- /dev/null +++ b/Dockerfile.php @@ -0,0 +1,12 @@ +FROM php:8.2-fpm +#WORKDIR /var/www/html +COPY ./ /var/www/html/ + +RUN apt-get update \ + && apt-get install -y git libzip-dev zip \ + && docker-php-ext-install zip \ + && cd /var/www/html \ + && chmod +x composer_install.sh && ./composer_install.sh \ + && mv composer.phar /usr/local/bin/composer \ + && composer install \ + && rm compose.yml composer_install.sh default.conf Dockerfile.nginx Dockerfile.php diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..61c8173 --- /dev/null +++ b/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "jumbojett/openid-connect-php": "^0.9.10" + } +} \ No newline at end of file diff --git a/composer_install.sh b/composer_install.sh new file mode 100644 index 0000000..585031d --- /dev/null +++ b/composer_install.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" +php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" + +if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] +then + >&2 echo 'ERROR: Invalid installer checksum' + rm composer-setup.php + exit 1 +fi + +php composer-setup.php --quiet +RESULT=$? +rm composer-setup.php +exit $RESULT \ No newline at end of file diff --git a/default.conf b/default.conf new file mode 100644 index 0000000..dc267af --- /dev/null +++ b/default.conf @@ -0,0 +1,24 @@ +server { + index index.php index.html; + server_name phpfpm.local; + error_log /var/log/nginx/error.log; + access_log /var/log/nginx/access.log; + root /var/www/html; + + location ~/.(env*)$ { + return 404; + } + + location ~ \.php$ { + index index.php; + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass php-fpm:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + } + + +} \ No newline at end of file From 02787d0abcb3d9b3b40607d2d63e4a14c20c264f Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Tue, 19 Sep 2023 07:42:04 +0000 Subject: [PATCH 02/35] add github action --- .github/workflows/ci.yaml | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..c085aa9 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,56 @@ +on: + push: + branches: + - "*" + +name: CI build +jobs: + build: + name: CI build + runs-on: ubuntu-latest + env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: ${{ github.repository }} + permissions: + contents: read + packages: write + steps: + + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=schedule + type=ref,event=branch + type=ref,event=tag + type=ref,event=pr + type=raw,value={{branch}}-{{sha}}-{{date 'X'}},enable=${{ github.event_name != 'pull_request' }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile.php + push: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]'}} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file From afffe88c4390f2aea95fa156d552e3e9f31da334 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Tue, 19 Sep 2023 11:26:56 +0000 Subject: [PATCH 03/35] change nginx to caddy --- .github/workflows/ci.yaml | 22 +++++++++++++++++++++- Dockerfile.caddy | 2 ++ Dockerfile.nginx | 2 -- default.conf | 24 ------------------------ 4 files changed, 23 insertions(+), 27 deletions(-) create mode 100644 Dockerfile.caddy delete mode 100644 Dockerfile.nginx delete mode 100644 default.conf diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c085aa9..0ff87be 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,7 +39,7 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-php tags: | type=schedule type=ref,event=branch @@ -53,4 +53,24 @@ jobs: file: ./Dockerfile.php push: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]'}} tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-caddy + tags: | + type=schedule + type=ref,event=branch + type=ref,event=tag + type=ref,event=pr + type=raw,value={{branch}}-{{sha}}-{{date 'X'}},enable=${{ github.event_name != 'pull_request' }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile.caddy + push: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]'}} + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/Dockerfile.caddy b/Dockerfile.caddy new file mode 100644 index 0000000..8004875 --- /dev/null +++ b/Dockerfile.caddy @@ -0,0 +1,2 @@ +FROM caddy:latest +COPY . /var/www/html/public \ No newline at end of file diff --git a/Dockerfile.nginx b/Dockerfile.nginx deleted file mode 100644 index ec9d167..0000000 --- a/Dockerfile.nginx +++ /dev/null @@ -1,2 +0,0 @@ -FROM nginx:latest -COPY default.conf /etc/nginx/conf.d/default.conf \ No newline at end of file diff --git a/default.conf b/default.conf deleted file mode 100644 index dc267af..0000000 --- a/default.conf +++ /dev/null @@ -1,24 +0,0 @@ -server { - index index.php index.html; - server_name phpfpm.local; - error_log /var/log/nginx/error.log; - access_log /var/log/nginx/access.log; - root /var/www/html; - - location ~/.(env*)$ { - return 404; - } - - location ~ \.php$ { - index index.php; - try_files $uri =404; - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass php-fpm:9000; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param PATH_INFO $fastcgi_path_info; - } - - -} \ No newline at end of file From 50d66da03c1c2e179ed960bba73bb01225bf1a00 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Tue, 19 Sep 2023 11:28:03 +0000 Subject: [PATCH 04/35] get environment variables --- login.php | 24 ++++++++++++------------ oic_login.php | 17 ++++++++--------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/login.php b/login.php index b8d4a00..30c350a 100644 --- a/login.php +++ b/login.php @@ -11,16 +11,16 @@ function auth( $password ) { - $env = parse_ini_file('.env'); + #$env = parse_ini_file('.env'); # Hostname des LDAP-Servers - $host = $env["LDAP_HOST"]; + $host = getenv("LDAP_HOST"); # Base-DN des LDAP-Baums - $base_dn = $env["LDAP_BASE_DN"]; + $base_dn = getenv("LDAP_BASE_DN"); # das dazugehörige Passwort - $bind_pw = $env["LDAP_BIND_PW"]; + $bind_pw = getenv("LDAP_BIND_PW"); # Search-DN des LDAP-Baums - $search_dn = $env["LDAP_SEARCH_DN"]; + $search_dn = getenv("LDAP_SEARCH_DN"); if (empty($username) || empty($password)) { @@ -89,9 +89,9 @@ function auth( return true; } - $env = parse_ini_file('.env'); + #$env = parse_ini_file('.env'); # Testuser account ist aktiviert - $testuser = $env["TESTUSER"]; + $testuser = getenv("TESTUSER"); if ($testuser && $_POST["account"] == "tester" && $_POST["password"] == "superlangespasswort123") { // echo "login erfolgreich!"; @@ -133,21 +133,21 @@ function auth(

Willkommen zurück!

"; } - if (trim($env["Authentication"]) == "LDAP") { + if (getenv("Authentication") == "LDAP") { $login_available = true; $server = $_SERVER['PHP_SELF']; - $ldap_login = $env["LDAP_LOGIN_BUTTON"]??'Login'; + $ldap_login = getenv("LDAP_LOGIN_BUTTON")??'Login'; echo '
diff --git a/oic_login.php b/oic_login.php index e71bf7c..ae3babc 100644 --- a/oic_login.php +++ b/oic_login.php @@ -1,24 +1,24 @@ setHttpUpgradeInsecureRequests(false); } @@ -38,5 +38,4 @@ header("Location: interface.php"); exit(); -?> - +?> \ No newline at end of file From eeccc1968734f2a5b6c0c5a0d6c254c5834dcb72 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Tue, 19 Sep 2023 11:30:29 +0000 Subject: [PATCH 05/35] fix ci --- .github/workflows/ci.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0ff87be..642a461 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,7 +36,7 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract Docker metadata - id: meta + id: meta-php uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-php @@ -52,11 +52,11 @@ jobs: context: . file: ./Dockerfile.php push: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]'}} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.meta-php.outputs.tags }} + labels: ${{ steps.meta-php.outputs.labels }} - name: Extract Docker metadata - id: meta + id: meta-caddy uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-caddy @@ -72,5 +72,5 @@ jobs: context: . file: ./Dockerfile.caddy push: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]'}} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + tags: ${{ steps.meta-caddy.outputs.tags }} + labels: ${{ steps.meta-caddy.outputs.labels }} \ No newline at end of file From f4058760ddc9584c28052acb58e4194ead40b392 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Tue, 19 Sep 2023 11:46:27 +0000 Subject: [PATCH 06/35] fix: remove instruction --- Dockerfile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.php b/Dockerfile.php index 58918bb..c1a6f18 100644 --- a/Dockerfile.php +++ b/Dockerfile.php @@ -9,4 +9,4 @@ && chmod +x composer_install.sh && ./composer_install.sh \ && mv composer.phar /usr/local/bin/composer \ && composer install \ - && rm compose.yml composer_install.sh default.conf Dockerfile.nginx Dockerfile.php + && rm compose.yml composer_install.sh Dockerfile.caddy Dockerfile.php From 6d7d18c4f91f9f67acfac3d8d41b336006799806 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Tue, 19 Sep 2023 13:46:35 +0000 Subject: [PATCH 07/35] remove instruction --- Dockerfile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.php b/Dockerfile.php index c1a6f18..15f256a 100644 --- a/Dockerfile.php +++ b/Dockerfile.php @@ -9,4 +9,4 @@ && chmod +x composer_install.sh && ./composer_install.sh \ && mv composer.phar /usr/local/bin/composer \ && composer install \ - && rm compose.yml composer_install.sh Dockerfile.caddy Dockerfile.php + && rm composer_install.sh Dockerfile.caddy Dockerfile.php From 7aa5d32aff92b060073230a5100b12eca8bbc107 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Tue, 19 Sep 2023 14:22:59 +0000 Subject: [PATCH 08/35] get link from environment variable --- datenschutz/index.php | 2 +- impressum/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/datenschutz/index.php b/datenschutz/index.php index fc88aee..56cfbaf 100644 --- a/datenschutz/index.php +++ b/datenschutz/index.php @@ -1,6 +1,6 @@ Date: Tue, 19 Sep 2023 14:24:12 +0000 Subject: [PATCH 09/35] change path and use email as 'username' --- oic_login.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/oic_login.php b/oic_login.php index ae3babc..57b4e08 100644 --- a/oic_login.php +++ b/oic_login.php @@ -1,15 +1,11 @@ setHttpUpgradeInsecureRequests(false); } +$oidc->addScope('profile','email'); $oidc->authenticate(); $_SESSION['oidcClient'] = $oidc; // Set session variable username -$firstname = $oidc->requestUserInfo('given_name'); -$surname = $oidc->requestUserInfo('family_name'); -$initials = substr($firstname, 0, 1) . substr($surname, 0, 1); +#$firstname = $oidc->requestUserInfo('given_name'); +#$surname = $oidc->requestUserInfo('family_name'); +#$initials = substr($firstname, 0, 1) . substr($surname, 0, 1); +# +#$_SESSION['username'] = $initials; -$_SESSION['username'] = $initials; +$_SESSION['username'] = $oidc->requestUserInfo('email'); header("Location: interface.php"); From 37280240949b70a782db8913f8af1cadf0990d7c Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Tue, 19 Sep 2023 14:26:43 +0000 Subject: [PATCH 10/35] remove comment out lines --- login.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/login.php b/login.php index 30c350a..113f618 100644 --- a/login.php +++ b/login.php @@ -11,7 +11,6 @@ function auth( $password ) { - #$env = parse_ini_file('.env'); # Hostname des LDAP-Servers $host = getenv("LDAP_HOST"); @@ -89,7 +88,6 @@ function auth( return true; } - #$env = parse_ini_file('.env'); # Testuser account ist aktiviert $testuser = getenv("TESTUSER"); @@ -133,9 +131,8 @@ function auth(

Willkommen zurück!

Date: Tue, 19 Sep 2023 14:48:58 +0000 Subject: [PATCH 11/35] show email when logged in --- interface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface.php b/interface.php index bc58183..ea55ca8 100644 --- a/interface.php +++ b/interface.php @@ -97,7 +97,7 @@
Über HAWKI Feedback - Abmelden + Abmelden ()
Datenschutz Impressum From b81a1b60e274175804c9d1523208a85a2b3b8780 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Wed, 20 Sep 2023 07:32:27 +0000 Subject: [PATCH 12/35] get API key over environment variable --- stream-api.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stream-api.php b/stream-api.php index 0269bae..89bc762 100644 --- a/stream-api.php +++ b/stream-api.php @@ -20,11 +20,10 @@ } -$env = parse_ini_file('.env'); // Replace with your API URL and API key $apiUrl = 'https://api.openai.com/v1/chat/completions'; -$apiKey = $env['OPENAI_API_KEY']; +$apiKey = getenv('OPENAI_API_KEY'); // Read the request payload from the client $requestPayload = file_get_contents('php://input'); From af9387634cce6342d8797e5f0085d6918e771e64 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Wed, 20 Sep 2023 07:33:22 +0000 Subject: [PATCH 13/35] remove instruction --- datenschutz/index.php | 1 - impressum/index.php | 1 - 2 files changed, 2 deletions(-) diff --git a/datenschutz/index.php b/datenschutz/index.php index 56cfbaf..ded596e 100644 --- a/datenschutz/index.php +++ b/datenschutz/index.php @@ -1,5 +1,4 @@ Date: Wed, 20 Sep 2023 08:01:45 +0000 Subject: [PATCH 14/35] add title --- interface.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interface.php b/interface.php index ea55ca8..1ba5692 100644 --- a/interface.php +++ b/interface.php @@ -7,7 +7,10 @@ } ?> - + + AI Lab + + From 8c6a5fae4642012ab6d53af21519b485760ce014 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Wed, 20 Sep 2023 08:12:50 +0000 Subject: [PATCH 15/35] add user initials --- interface.php | 4 ++-- oic_login.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/interface.php b/interface.php index 1ba5692..8138bad 100644 --- a/interface.php +++ b/interface.php @@ -418,7 +418,7 @@ function addMessage(message){ if(message.role == "assistant"){ messageElement.querySelector(".message-icon").textContent = "AI"; }else{ - messageElement.querySelector(".message-icon").textContent = ''; + messageElement.querySelector(".message-icon").textContent = ''; messageElement.querySelector(".message").classList.add("me"); } @@ -465,7 +465,7 @@ function modalClick(element){ const inputField = document.querySelector(".userpost-field"); let message = {}; - message.role = ''; + message.role = ''; message.content = inputField.value.trim(); fetch('userpost.php', { diff --git a/oic_login.php b/oic_login.php index 57b4e08..865919c 100644 --- a/oic_login.php +++ b/oic_login.php @@ -25,11 +25,11 @@ $_SESSION['oidcClient'] = $oidc; // Set session variable username -#$firstname = $oidc->requestUserInfo('given_name'); -#$surname = $oidc->requestUserInfo('family_name'); -#$initials = substr($firstname, 0, 1) . substr($surname, 0, 1); +$firstname = $oidc->requestUserInfo('given_name'); +$surname = $oidc->requestUserInfo('family_name'); +$initials = substr($firstname, 0, 1) . substr($surname, 0, 1); # -#$_SESSION['username'] = $initials; +$_SESSION['initials'] = $initials; $_SESSION['username'] = $oidc->requestUserInfo('email'); From 3029499e53ae28a24dfcc381de62e032339c8d71 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Wed, 20 Sep 2023 08:55:32 +0000 Subject: [PATCH 16/35] add oidc logout --- logout.php | 6 ++++++ oic_login.php | 2 ++ 2 files changed, 8 insertions(+) diff --git a/logout.php b/logout.php index e46f75d..317022d 100644 --- a/logout.php +++ b/logout.php @@ -1,5 +1,11 @@ sign_out($oidc->getIdToken(), "https://ai.lab.hm.edu/logout.php"); +} + session_destroy(); header("Location: login.php"); exit; diff --git a/oic_login.php b/oic_login.php index 865919c..75c045f 100644 --- a/oic_login.php +++ b/oic_login.php @@ -33,6 +33,8 @@ $_SESSION['username'] = $oidc->requestUserInfo('email'); +$_SESSION['oidc'] = $oidc; + header("Location: interface.php"); exit(); From b9f72d2377c451e3c667e109dbf85ff70e96cd06 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Wed, 20 Sep 2023 09:04:47 +0000 Subject: [PATCH 17/35] move logout from oidc to new file --- interface.php | 4 +++- logout.php | 6 ------ logout_oidc.php | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 logout_oidc.php diff --git a/interface.php b/interface.php index 8138bad..0cec626 100644 --- a/interface.php +++ b/interface.php @@ -100,7 +100,9 @@
Über HAWKI Feedback - Abmelden () + >Abmelden ()
Datenschutz Impressum diff --git a/logout.php b/logout.php index 317022d..e46f75d 100644 --- a/logout.php +++ b/logout.php @@ -1,11 +1,5 @@ sign_out($oidc->getIdToken(), "https://ai.lab.hm.edu/logout.php"); -} - session_destroy(); header("Location: login.php"); exit; diff --git a/logout_oidc.php b/logout_oidc.php new file mode 100644 index 0000000..acbc914 --- /dev/null +++ b/logout_oidc.php @@ -0,0 +1,16 @@ + sign_out($oidc->getIdToken(), "https://ai.lab.hm.edu/logout.php"); + + + +session_destroy(); +header("Location: login.php"); +exit; +?> \ No newline at end of file From 7416e74859da10525d3bb25e3ad9f8a86b496dfe Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Wed, 20 Sep 2023 09:10:08 +0000 Subject: [PATCH 18/35] fix function call --- logout_oidc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logout_oidc.php b/logout_oidc.php index acbc914..e526084 100644 --- a/logout_oidc.php +++ b/logout_oidc.php @@ -6,7 +6,7 @@ session_start(); $oidc = $_SESSION['oidc']; unset($_SESSION['oidc']); -$oidc -> sign_out($oidc->getIdToken(), "https://ai.lab.hm.edu/logout.php"); +$oidc -> signOut($oidc->getIdToken(), "https://ai.lab.hm.edu/logout.php"); From 193ff57e8eef2ffd924f64f9438849d735415ef3 Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Wed, 20 Sep 2023 10:59:17 +0000 Subject: [PATCH 19/35] fix logout oidc --- logout_oidc.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/logout_oidc.php b/logout_oidc.php index e526084..1d6fae6 100644 --- a/logout_oidc.php +++ b/logout_oidc.php @@ -1,16 +1,6 @@ signOut($oidc->getIdToken(), "https://ai.lab.hm.edu/logout.php"); - - - session_destroy(); -header("Location: login.php"); +header("Location: https://sso.hm.edu/idp/profile/Logout"); exit; ?> \ No newline at end of file From 024c5df4740e6c8f2fdea65df87edf30f3fef66c Mon Sep 17 00:00:00 2001 From: Mehmet Sagir Date: Wed, 20 Sep 2023 11:23:35 +0000 Subject: [PATCH 20/35] add HM logo and favicon --- img/favicon.jpg | Bin 0 -> 3641 bytes img/logo.svg | 19 ++++++++++++++++++- interface.php | 3 ++- login.php | 1 + 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 img/favicon.jpg diff --git a/img/favicon.jpg b/img/favicon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..345777ea0eb592eca02869310be58058508d546b GIT binary patch literal 3641 zcmbVO2UJtZ8XhF{tQaYRqM;KAMXCi!7Fpl{A|gnXDxzXQR{`lrD57pGC{oraL`sli zKtz!xxutxN zk)FDy{NW=f(A|fn`l>7lHCWe$Da&nk0>YAH%4Gav>YTHb<>g~|hH_%&g!Y3jkf)qo_{P2T} zo`Rf$-v3;n8h{c8HK2x{PZ6v_@$sYhpgMpCfKLEMy8`(4!ncYaAs{FuEFvlf8xo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4_jH5(M@U(zDEyrrJ zvAj`cno!T3rG~o@7+l8dyO&kNp}Ya_CLgR4;!c;O(#Lft!glpW+&3U<>ox0Hto9Af zug?nEf1n{XWVeedbtshj-4*IzM*3kc=JKfRv3=uiw&s}9hG!Gc z{R~(#DSL00--p#|$&R)x+TUqUcwAlm*jMfOk0$(;z_oV%M!s? ZXrDW*0j%o)=1b#uKcCIN|9d>t^KbMo%7Op@ literal 0 HcmV?d00001 diff --git a/img/logo.svg b/img/logo.svg index eb78004..86ffe9c 100644 --- a/img/logo.svg +++ b/img/logo.svg @@ -1 +1,18 @@ - \ No newline at end of file + + + + + + + + + + + diff --git a/interface.php b/interface.php index 0cec626..c51bcae 100644 --- a/interface.php +++ b/interface.php @@ -13,7 +13,8 @@ - + +