From dcf46562bd3d79603f385b54e10cecb95647d138 Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Thu, 27 Jan 2022 18:46:18 +0100
Subject: [PATCH] Fix remnant of old www-scripts

---
 docs/simplesamlphp-sp-api.md   | 2 +-
 lib/SimpleSAML/Auth/Simple.php | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/simplesamlphp-sp-api.md b/docs/simplesamlphp-sp-api.md
index e5b722b05..91391200a 100644
--- a/docs/simplesamlphp-sp-api.md
+++ b/docs/simplesamlphp-sp-api.md
@@ -256,7 +256,7 @@ The URL returned by this function is static, and will not change.
 You can easily create your own links without using this function.
 The URL should be:
 
-     .../simplesaml/module.php/core/as_login.php?AuthId=<authentication source>&ReturnTo=<return URL>
+     .../simplesaml/module.php/core/login/<authentication source>/?AuthId=<authentication source>&ReturnTo=<return URL>
 
 
 `getLogoutURL`
diff --git a/lib/SimpleSAML/Auth/Simple.php b/lib/SimpleSAML/Auth/Simple.php
index 419a2ca89..ca806d375 100644
--- a/lib/SimpleSAML/Auth/Simple.php
+++ b/lib/SimpleSAML/Auth/Simple.php
@@ -321,7 +321,7 @@ class Simple
             $returnTo = $httpUtils->getSelfURL();
         }
 
-        $login = Module::getModuleURL('core/as_login.php', [
+        $login = Module::getModuleURL('core/login/' . urlencode($this->authSource), [
             'AuthId'   => $this->authSource,
             'ReturnTo' => $returnTo,
         ]);
-- 
GitLab