Ignore the oauth token path in login with the environment variables

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2020-07-24 15:07:04 +02:00
parent 0c494e82cf
commit 2e8f668830
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -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();
}