Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/user_saml.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-07-24 16:07:04 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2020-07-24 16:07:04 +0300
commit2e8f66883073a1855706556100873c4ec0775c6e (patch)
tree9365678dfa83c557adfa1782d628a761b729c453
parent0c494e82cf24fba9c22cfee165ac8646004d2bf9 (diff)
Ignore the oauth token path in login with the environment variables
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--appinfo/app.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index 11aa7e8f..43db79eb 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -80,6 +80,12 @@ switch($config->getAppValue('user_saml', 'type')) {
}
if ($type === 'environment-variable') {
+ // We should ignore oauth2 token endpoint (oauth can send the credentials as basic auth which will fail with apache auth)
+ $uri = $request->getRequestUri();
+ if (substr($uri, -24) === '/apps/oauth/api/v1/token') {
+ return;
+ }
+
OC_User::handleApacheAuth();
}