push to v1.27.0

This commit is contained in:
Sebastian Hugentobler 2021-02-23 22:51:10 +01:00
parent 2ff69b5349
commit 076ffd923c
Signed by: shu
GPG key ID: BB32CF3CA052C2F0
3 changed files with 7 additions and 11 deletions

View file

@ -0,0 +1,22 @@
from synapse.handlers.oidc_handler import OidcMappingProvider
class NextcloudOidcMappingProvider(OidcMappingProvider):
def __init__(self, config):
self._config = config
@staticmethod
def parse_config(config):
return {}
def get_remote_user_id(self, userinfo):
return userinfo["ocs"]["data"]["id"]
async def map_user_attributes(self, userinfo, token):
localpart = userinfo["ocs"]["data"]["id"]
display_name = userinfo["ocs"]["data"]["display-name"]
return {"localpart": localpart, "display_name": display_name}
async def get_extra_attributes(self, userinfo, token):
extras = {}
return extras