Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eduGAIN Access Check - Account manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
edugain
eduGAIN Access Check - Account manager
Commits
e97f5d08
Commit
e97f5d08
authored
7 years ago
by
Guillaume ROUSSE
Browse files
Options
Downloads
Patches
Plain Diff
no need for localized names, extract a default one
parent
88c6d28a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/IdPAccountManager/SAMLMetadata.pm
+17
-9
17 additions, 9 deletions
lib/IdPAccountManager/SAMLMetadata.pm
templates/web/account_wizard.tt2.html
+2
-2
2 additions, 2 deletions
templates/web/account_wizard.tt2.html
with
19 additions
and
11 deletions
lib/IdPAccountManager/SAMLMetadata.pm
+
17
−
9
View file @
e97f5d08
...
...
@@ -153,12 +153,12 @@ sub parse {
push
@
{
$data
->
{
contacts
}
},
$details
;
}
}
elsif
(
$child
->
localname
()
eq
'
Organization
')
{
foreach
my
$name
(
$child
->
getChildrenByLocalName
('
OrganizationName
'))
{
$
data
->
{
name
}
->
{
$name
->
getAttribute
('
xml:lang
')
}
=
$name
->
textContent
();
}
foreach
my
$name
(
$child
->
getChildrenByLocalName
('
OrganizationDisplayName
'))
{
$
data
->
{
display_name
}
->
{
$name
->
getAttribute
('
xml:lang
')
}
=
$name
->
textContent
();
}
$data
->
{
name
}
=
_get_default_value
(
$
child
,
'
OrganizationName
'
);
$data
->
{
display_name
}
=
_get_default_value
(
$
child
,
'
OrganizationDisplayName
'
);
}
## Getting X.509 certificates
...
...
@@ -174,9 +174,6 @@ sub parse {
if
(
$data
->
{
domain
});
$data
->
{
domain
}
=
$domains
;
# compute default display name for template sorting
$data
->
{
default_display_name
}
=
$data
->
{
display_name
}
->
{
en
};
push
@array
,
$data
;
}
...
...
@@ -200,6 +197,17 @@ sub _boolean2integer {
undef
;
}
sub
_get_default_value
{
my
(
$node
,
$child_name
)
=
@_
;
my
%names
;
$names
{
$_
->
getAttribute
('
xml:lang
')
}
=
$_
->
textContent
()
foreach
$node
->
getChildrenByLocalName
(
$child_name
);
return
$names
{
en
}
?
$names
{
en
}
:
(
values
%names
)[
0
];
}
1
;
__END__
...
...
This diff is collapsed.
Click to expand it.
templates/web/account_wizard.tt2.html
+
2
−
2
View file @
e97f5d08
...
...
@@ -111,8 +111,8 @@ Note that only Service Providers are in the list which are included in the eduGA
<select
id=
"sp_entityid"
name=
"sp_entityid"
class=
"required"
>
<option
value=
""
>
Select your Service Provider below
</option>
[% FOREACH entity IN metadata.sort('
default_
display_name') %]
<option
value=
"[% entity.entityid %]"
>
[% IF entity.
default_
display_name %][% entity.
default_
display_name %] [% END %]([% entity.entityid %])
</option>
[% FOREACH entity IN metadata.sort('display_name') %]
<option
value=
"[% entity.entityid %]"
>
[% IF entity.display_name %][% entity.display_name %] [% END %]([% entity.entityid %])
</option>
[% END %]
</select>
<br/>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment