install authlib and psql driver
This commit is contained in:
parent
7700dd85bc
commit
008292bf4e
2 changed files with 2 additions and 3 deletions
22
rootfs/py-pkgs/nextcloud_oicd_mapping_provider.py
Normal file
22
rootfs/py-pkgs/nextcloud_oicd_mapping_provider.py
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue