@@ -5,7 +5,9 @@ def collect_entity_metadata(mdstore, entity_id):
55 "privacy_statement" : get_privacy_statement (mdstore , entity_id ),
66 "contacts" : get_contacts (mdstore , entity_id ),
77 "entity_categories" : get_entity_categories (mdstore , entity_id ),
8- "supported_entity_categories" : get_supported_entity_categories (mdstore , entity_id ),
8+ "supported_entity_categories" : get_supported_entity_categories (
9+ mdstore , entity_id
10+ ),
911 "assurance_certifications" : get_assurance_certifications (mdstore , entity_id ),
1012 "registration_info" : get_registration_info (mdstore , entity_id ),
1113 "error_url" : get_error_url (mdstore , entity_id ),
@@ -19,9 +21,25 @@ def get_display_name(mdstore, entity_id):
1921 return display_name
2022
2123
24+ def get_display_names_lang (mdstore , entity_id ):
25+ langs = ["en" , "cs" ]
26+ display_names = []
27+ for lang in langs :
28+ if mdstore .get ("client_name#" + lang , None ):
29+ display_names .append (
30+ {"text" : mdstore .get ("client_name#" + lang ), "lang" : lang }
31+ )
32+ display_name = mdstore .get ("client_name" )
33+ return display_name
34+
35+
2236def get_logo (mdstore , entity_id ):
37+ ret_logo = []
2338 logo = mdstore .get ("logo_uri" )
24- return logo
39+ width = mdstore .get ("logo_width" )
40+ height = mdstore .get ("logo_height" )
41+ ret_logo .append ({"text" : logo , "height" : height , "width" : width })
42+ return ret_logo
2543
2644
2745def get_privacy_statement (mdstore , entity_id ):
@@ -39,23 +57,23 @@ def get_contacts(mdstore, entity_id):
3957 "mailto:{contact}" .format (contact = email )
4058 for email in (mdstore .get ("contacts" ) or [])
4159 ],
42- "given_name" : ""
60+ "given_name" : "" ,
4361 },
4462 {
4563 "contact_type" : "technical" ,
4664 "email_address" : [
4765 "mailto:{contact}" .format (contact = email )
4866 for email in (mdstore .get ("technical_contacts" ) or [])
4967 ],
50- "given_name" : ""
68+ "given_name" : "" ,
5169 },
5270 {
5371 "contact_type" : "security" ,
5472 "email_address" : [
5573 "mailto:{contact}" .format (contact = email )
5674 for email in (mdstore .get ("security_contacts" ) or [])
5775 ],
58- "given_name" : ""
76+ "given_name" : "" ,
5977 },
6078 ]
6179 if contact ["email_address" ]
@@ -65,8 +83,8 @@ def get_contacts(mdstore, entity_id):
6583
6684def get_entity_categories (mdstore , entity_id ):
6785 entity_categories_translation = {
68- ' research_and_scholarship' : ' http://refeds.org/category/research-and-scholarship' ,
69- ' geant_coco' : ' http://www.geant.net/uri/dataprotection-code-of-conduct/v1' ,
86+ " research_and_scholarship" : " http://refeds.org/category/research-and-scholarship" ,
87+ " geant_coco" : " http://www.geant.net/uri/dataprotection-code-of-conduct/v1" ,
7088 }
7189 entity_categories = [
7290 category
@@ -83,7 +101,7 @@ def get_supported_entity_categories(mdstore, entity_id):
83101
84102def get_assurance_certifications (mdstore , entity_id ):
85103 assurance_certifications_translations = {
86- ' sirtfi' : ' https://refeds.org/sirtfi' ,
104+ " sirtfi" : " https://refeds.org/sirtfi" ,
87105 }
88106 assurance_certifications = [
89107 certification
0 commit comments