Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GIP RENATER
switch-wayf
Commits
0a21f229
Commit
0a21f229
authored
Dec 19, 2011
by
haemmer
Browse files
Added code to parse MDUI:Keywords from SAML2 metadata
parent
fa6788e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
readMetadata.php
View file @
0a21f229
...
...
@@ -326,6 +326,12 @@ function processIDPRoleDescriptor($IDPRoleDescriptorNode){
$protocols
=
$IDPRoleDescriptorNode
->
getAttribute
(
'protocolSupportEnumeration'
);
$IDP
[
'Protocols'
]
=
$protocols
;
// Get keywords
$MDUIKeywords
=
getMDUIKeywords
(
$IDPRoleDescriptorNode
);
foreach
(
$MDUIKeywords
as
$lang
=>
$keywords
){
$IDP
[
$lang
][
'Keywords'
]
=
$keywords
;
}
return
$IDP
;
}
...
...
@@ -386,6 +392,12 @@ function processSPRoleDescriptor($SPRoleDescriptorNode){
$protocols
=
$SPRoleDescriptorNode
->
getAttribute
(
'protocolSupportEnumeration'
);
$SP
[
'Protocols'
]
=
$protocols
;
// Get keywords
$MDUIKeywords
=
getMDUIKeywords
(
$SPRoleDescriptorNode
);
foreach
(
$MDUIKeywords
as
$lang
=>
$keywords
){
$SP
[
$lang
][
'Keywords'
]
=
$keywords
;
}
return
$SP
;
}
...
...
@@ -479,6 +491,20 @@ function getMDUIDisplayNames($RoleDescriptorNode){
return
$Entity
;
}
/******************************************************************************/
// Get MD Keywords from RoleDescriptor
function
getMDUIKeywords
(
$RoleDescriptorNode
){
$Entity
=
Array
();
$MDUIKeywords
=
$RoleDescriptorNode
->
getElementsByTagNameNS
(
'urn:oasis:names:tc:SAML:metadata:ui'
,
'Keywords'
);
foreach
(
$MDUIKeywords
as
$MDUIKeywordEntry
){
$lang
=
$MDUIKeywordEntry
->
getAttributeNodeNS
(
'http://www.w3.org/XML/1998/namespace'
,
'lang'
)
->
nodeValue
;
$Entity
[
$lang
]
=
$MDUIKeywordEntry
->
nodeValue
;
}
return
$Entity
;
}
/******************************************************************************/
// Get Organization Names from RoleDescriptor
function
getOrganizationNames
(
$RoleDescriptorNode
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment