From a43fc0f05a40ca40ea8588c0a472b0b2a3a555f6 Mon Sep 17 00:00:00 2001 From: darta Date: Thu, 9 Dec 2021 15:12:50 +0100 Subject: [PATCH] Added missing nextcloud mappers --- admin/src/nextcloud_saml.py | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/admin/src/nextcloud_saml.py b/admin/src/nextcloud_saml.py index cd88566..ddef1c4 100644 --- a/admin/src/nextcloud_saml.py +++ b/admin/src/nextcloud_saml.py @@ -221,6 +221,18 @@ class NextcloudSaml(): "attribute.name" : "username" } }, { + "id" : "8ab13cd7-822a-40d5-a1e1-9f556aed2332", + "name" : "quota", + "protocol" : "saml", + "protocolMapper" : "saml-user-attribute-mapper", + "consentRequired" : False, + "config" : { + "attribute.nameformat" : "Basic", + "user.attribute" : "quota", + "friendly.name" : "quota", + "attribute.name" : "quota" + } + }, { "id" : "28206b59-757b-4e3c-81cb-0b6053b1fd3d", "name" : "email", "protocol" : "saml", @@ -233,6 +245,19 @@ class NextcloudSaml(): "attribute.name" : "email" } }, { + "id" : "5176a593-180f-4924-b294-b83a0d8d5972", + "name" : "displayname", + "protocol" : "saml", + "protocolMapper" : "saml-javascript-mapper", + "consentRequired" : False, + "config" : { + "single" : False, + "Script" : "/**\n * Available variables: \n * user - the current user\n * realm - the current realm\n * clientSession - the current clientSession\n * userSession - the current userSession\n * keycloakSession - the current keycloakSession\n */\n\n\n//insert your code here...\nvar Output = user.getFirstName()+\" \"+user.getLastName();\nOutput;\n", + "attribute.nameformat" : "Basic", + "friendly.name" : "displayname", + "attribute.name" : "displayname" + } + }, { "id" : "e51e04b9-f71a-42de-819e-dd9285246ada", "name" : "Roles", "protocol" : "saml", @@ -244,6 +269,19 @@ class NextcloudSaml(): "friendly.name" : "Roles", "attribute.name" : "Roles" } + }, { + "id" : "9c101249-bb09-4cc8-8f75-5a18fcb307e6", + "name" : "group_list", + "protocol" : "saml", + "protocolMapper" : "saml-group-membership-mapper", + "consentRequired" : False, + "config" : { + "single" : True, + "attribute.nameformat" : "Basic", + "full.path" : False, + "friendly.name" : "member", + "attribute.name" : "member" + } } ], "defaultClientScopes" : [ "web-origins", "role_list", "roles", "profile", "email" ], "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ],