Login filter error with webdav protocol
When using realm role filtering, it doesn't work with the WebDAV protocol.
My configuration is as follows, in accordance with the documentation:
'oidc_login_filter_allowed_values' => array('nextcloud'),
'login_filter' => 'realm_access_roles',
My workaround is implemented in the following code snippet found in apps/oidc_login/lib/Service/LoginService.php on line 425:
$profile = json_decode(json_encode($profile), true); //
$profile['realm_access_roles'] = $profile['realm_access']['roles'];
This is due to two factors:
- $profile['realm_access_roles'] is undefined.
- $profile is of type Object(stdClass) and not Array(), as evident in apps/oidc_login/lib/Service/AttributeMap.php:
public function hasLoginFilter(&$profile)
{
return \array_key_exists($this->_login_filter, $profile);
}
Is it possible to correct it? Thanks !
Can you reproduce this in the current alpha version? https://github.com/pulsejet/nextcloud-oidc-login/releases/tag/v3.0.0-rc.2
Thank you for your response. I have just installed version 3.0.0-rc2. This time, I am receiving a 401 error even before reaching getLoginFilterValues(), just like in version 2.6.0. Web authentication works perfectly in both versions. The error is only reproduced in the WebDAV protocol.