Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
595fb43c
Commit
595fb43c
authored
9 years ago
by
Jaime Perez Crespo
Browse files
Options
Downloads
Patches
Plain Diff
Reformat and enhance IdP selection pages.
parent
54e93fd1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/saml/www/disco.php
+1
-1
1 addition, 1 deletion
modules/saml/www/disco.php
templates/selectidp-dropdown.php
+40
-53
40 additions, 53 deletions
templates/selectidp-dropdown.php
templates/selectidp-links.php
+70
-77
70 additions, 77 deletions
templates/selectidp-links.php
with
111 additions
and
131 deletions
modules/saml/www/disco.php
+
1
−
1
View file @
595fb43c
<?php
/**
* Builtin IdP discovery service.
* Built
-
in IdP discovery service.
*/
$discoHandler
=
new
SimpleSAML_XHTML_IdPDisco
(
array
(
'saml20-idp-remote'
,
'shib13-idp-remote'
),
'saml'
);
...
...
This diff is collapsed.
Click to expand it.
templates/selectidp-dropdown.php
+
40
−
53
View file @
595fb43c
<?php
if
(
!
array_key_exists
(
'header'
,
$this
->
data
))
{
$this
->
data
[
'header'
]
=
'selectidp'
;
if
(
!
array_key_exists
(
'header'
,
$this
->
data
))
{
$this
->
data
[
'header'
]
=
'selectidp'
;
}
$this
->
data
[
'header'
]
=
$this
->
t
(
$this
->
data
[
'header'
]);
$this
->
data
[
'autofocus'
]
=
'dropdownlist'
;
$this
->
includeAtTemplateBase
(
'includes/header.php'
);
foreach
(
$this
->
data
[
'idplist'
]
AS
$idpentry
)
{
if
(
!
empty
(
$idpentry
[
'name'
]))
{
$this
->
includeInlineTranslation
(
'idpname_'
.
$idpentry
[
'entityid'
],
$idpentry
[
'name'
]);
}
elseif
(
!
empty
(
$idpentry
[
'OrganizationDisplayName'
]))
{
$this
->
includeInlineTranslation
(
'idpname_'
.
$idpentry
[
'entityid'
],
$idpentry
[
'OrganizationDisplayName'
]);
}
if
(
!
empty
(
$idpentry
[
'description'
]))
$this
->
includeInlineTranslation
(
'idpdesc_'
.
$idpentry
[
'entityid'
],
$idpentry
[
'description'
]);
foreach
(
$this
->
data
[
'idplist'
]
as
$idpentry
)
{
if
(
!
empty
(
$idpentry
[
'name'
]))
{
$this
->
includeInlineTranslation
(
'idpname_'
.
$idpentry
[
'entityid'
],
$idpentry
[
'name'
]);
}
elseif
(
!
empty
(
$idpentry
[
'OrganizationDisplayName'
]))
{
$this
->
includeInlineTranslation
(
'idpname_'
.
$idpentry
[
'entityid'
],
$idpentry
[
'OrganizationDisplayName'
]);
}
if
(
!
empty
(
$idpentry
[
'description'
]))
{
$this
->
includeInlineTranslation
(
'idpdesc_'
.
$idpentry
[
'entityid'
],
$idpentry
[
'description'
]);
}
}
?>
<h2>
<?php
echo
$this
->
data
[
'header'
];
?>
</h2>
<p>
<?php
echo
$this
->
t
(
'selectidp_full'
);
?>
</p>
<form
method=
"get"
action=
"
<?php
echo
$this
->
data
[
'urlpattern'
];
?>
"
>
<input
type=
"hidden"
name=
"entityID"
value=
"
<?php
echo
htmlspecialchars
(
$this
->
data
[
'entityID'
]);
?>
"
/>
<input
type=
"hidden"
name=
"return"
value=
"
<?php
echo
htmlspecialchars
(
$this
->
data
[
'return'
]);
?>
"
/>
<input
type=
"hidden"
name=
"returnIDParam"
value=
"
<?php
echo
htmlspecialchars
(
$this
->
data
[
'returnIDParam'
]);
?>
"
/>
<select
id=
"dropdownlist"
name=
"idpentityid"
>
<?php
usort
(
$this
->
data
[
'idplist'
],
function
(
$idpentry1
,
$idpentry2
)
{
return
strcmp
(
$this
->
t
(
'idpname_'
.
$idpentry1
[
'entityid'
]),
$this
->
t
(
'idpname_'
.
$idpentry2
[
'entityid'
]));
});
foreach
(
$this
->
data
[
'idplist'
]
AS
$idpentry
)
{
echo
'<option value="'
.
htmlspecialchars
(
$idpentry
[
'entityid'
])
.
'"'
;
if
(
isset
(
$this
->
data
[
'preferredidp'
])
&&
$idpentry
[
'entityid'
]
==
$this
->
data
[
'preferredidp'
])
echo
' selected="selected"'
;
echo
'>'
.
htmlspecialchars
(
$this
->
t
(
'idpname_'
.
$idpentry
[
'entityid'
]))
.
'</option>'
;
}
?>
</select>
<input
type=
"submit"
value=
"
<?php
echo
$this
->
t
(
'select'
);
?>
"
/>
<?php
if
(
$this
->
data
[
'rememberenabled'
])
{
echo
(
'<br/><input type="checkbox" name="remember" value="1" />'
.
$this
->
t
(
'remember'
));
}
?>
</form>
<h2>
<?php
echo
$this
->
data
[
'header'
];
?>
</h2>
<p>
<?php
echo
$this
->
t
(
'selectidp_full'
);
?>
</p>
<form
method=
"get"
action=
"
<?php
echo
$this
->
data
[
'urlpattern'
];
?>
"
>
<input
type=
"hidden"
name=
"entityID"
value=
"
<?php
echo
htmlspecialchars
(
$this
->
data
[
'entityID'
]);
?>
"
/>
<input
type=
"hidden"
name=
"return"
value=
"
<?php
echo
htmlspecialchars
(
$this
->
data
[
'return'
]);
?>
"
/>
<input
type=
"hidden"
name=
"returnIDParam"
value=
"
<?php
echo
htmlspecialchars
(
$this
->
data
[
'returnIDParam'
]);
?>
"
/>
<select
id=
"dropdownlist"
name=
"idpentityid"
>
<?php
usort
(
$this
->
data
[
'idplist'
],
function
(
$idpentry1
,
$idpentry2
)
{
return
strcmp
(
$this
->
t
(
'idpname_'
.
$idpentry1
[
'entityid'
]),
$this
->
t
(
'idpname_'
.
$idpentry2
[
'entityid'
]));
});
foreach
(
$this
->
data
[
'idplist'
]
as
$idpentry
)
{
echo
'<option value="'
.
htmlspecialchars
(
$idpentry
[
'entityid'
])
.
'"'
;
if
(
isset
(
$this
->
data
[
'preferredidp'
])
&&
$idpentry
[
'entityid'
]
==
$this
->
data
[
'preferredidp'
])
{
echo
' selected="selected"'
;
}
echo
'>'
.
htmlspecialchars
(
$this
->
t
(
'idpname_'
.
$idpentry
[
'entityid'
]))
.
'</option>'
;
}
?>
</select>
<button
class=
"btn"
type=
"submit"
>
<?php
echo
$this
->
t
(
'select'
);
?>
</button>
<?php
if
(
$this
->
data
[
'rememberenabled'
])
{
echo
(
'<br/><input type="checkbox" name="remember" value="1" />'
.
$this
->
t
(
'remember'
));
}
?>
</form>
<?php
$this
->
includeAtTemplateBase
(
'includes/footer.php'
);
This diff is collapsed.
Click to expand it.
templates/selectidp-links.php
+
70
−
77
View file @
595fb43c
<?php
if
(
!
array_key_exists
(
'header'
,
$this
->
data
))
{
$this
->
data
[
'header'
]
=
'selectidp'
;
if
(
!
array_key_exists
(
'header'
,
$this
->
data
))
{
$this
->
data
[
'header'
]
=
'selectidp'
;
}
$this
->
data
[
'header'
]
=
$this
->
t
(
$this
->
data
[
'header'
]);
$this
->
data
[
'autofocus'
]
=
'preferredidp'
;
$this
->
includeAtTemplateBase
(
'includes/header.php'
);
foreach
(
$this
->
data
[
'idplist'
]
AS
$idpentry
)
{
if
(
isset
(
$idpentry
[
'name'
])
)
{
$this
->
includeInlineTranslation
(
'idpname_'
.
$idpentry
[
'entityid'
],
$idpentry
[
'n
ame'
])
;
}
elseif
(
isset
(
$idpentry
[
'OrganizationDisplayName'
])
)
{
$this
->
includeInlineTranslation
(
'idpname_'
.
$idpentry
[
'entityid'
],
$idpentry
[
'OrganizationDisplayName'
]);
}
if
(
isset
(
$idpentry
[
'description'
])
)
$this
->
includeInlineTranslation
(
'idpdesc_'
.
$idpentry
[
'entityid'
],
$idpentry
[
'description'
]);
foreach
(
$this
->
data
[
'idplist'
]
as
$idpentry
)
{
if
(
isset
(
$idpentry
[
'name'
])
)
{
$this
->
includeInlineTranslation
(
'idpname_'
.
$idpentry
[
'entityid'
],
$idpentry
[
'name'
])
;
}
elseif
(
isset
(
$idpentry
[
'OrganizationDisplayN
ame'
])
)
{
$this
->
includeInlineTranslation
(
'idpname_'
.
$idpentry
[
'entityid'
],
$idpentry
[
'OrganizationDisplayName'
])
;
}
if
(
isset
(
$idpentry
[
'description'
]))
{
$this
->
includeInlineTranslation
(
'idpdesc_'
.
$idpentry
[
'entityid'
],
$idpentry
[
'description'
])
;
}
}
?>
<h2>
<?php
echo
$this
->
data
[
'header'
];
?>
</h2>
<form
method=
"get"
action=
"
<?php
echo
$this
->
data
[
'urlpattern'
];
?>
"
>
<input
type=
"hidden"
name=
"entityID"
value=
"
<?php
echo
htmlspecialchars
(
$this
->
data
[
'entityID'
]);
?>
"
/>
<input
type=
"hidden"
name=
"return"
value=
"
<?php
echo
htmlspecialchars
(
$this
->
data
[
'return'
]);
?>
"
/>
<input
type=
"hidden"
name=
"returnIDParam"
value=
"
<?php
echo
htmlspecialchars
(
$this
->
data
[
'returnIDParam'
]);
?>
"
/>
<p>
<?php
echo
$this
->
t
(
'selectidp_full'
);
if
(
$this
->
data
[
'rememberenabled'
])
{
echo
(
'<br /><input type="checkbox" name="remember" value="1" title="'
.
$this
->
t
(
'remember'
)
.
'" />'
.
$this
->
t
(
'remember'
));
}
?>
</p>
<?php
if
(
!
empty
(
$this
->
data
[
'preferredidp'
])
&&
array_key_exists
(
$this
->
data
[
'preferredidp'
],
$this
->
data
[
'idplist'
]))
{
$idpentry
=
$this
->
data
[
'idplist'
][
$this
->
data
[
'preferredidp'
]];
echo
'<div class="preferredidp">'
;
echo
' <img src="/'
.
$this
->
data
[
'baseurlpath'
]
.
'resources/icons/experience/gtk-about.64x64.png" class="float-r" alt="'
.
$this
->
t
(
'icon_prefered_idp'
)
.
'" />'
;
if
(
array_key_exists
(
'icon'
,
$idpentry
)
&&
$idpentry
[
'icon'
]
!==
NULL
)
{
$iconUrl
=
\SimpleSAML\Utils\HTTP
::
resolveURL
(
$idpentry
[
'icon'
]);
echo
'<img class="float-l" style="margin: 1em; padding: 3px; border: 1px solid #999" src="'
.
htmlspecialchars
(
$iconUrl
)
.
'" />'
;
}
echo
"
\n
"
.
' <h3 style="margin-top: 8px">'
.
htmlspecialchars
(
$this
->
t
(
'idpname_'
.
$idpentry
[
'entityid'
]))
.
'</h3>'
;
if
(
!
empty
(
$idpentry
[
'description'
]))
{
echo
' <p>'
.
htmlspecialchars
(
$this
->
t
(
'idpdesc_'
.
$idpentry
[
'entityid'
]))
.
'<br />'
;
}
echo
(
'<input id="preferredidp" type="submit" name="idp_'
.
htmlspecialchars
(
$idpentry
[
'entityid'
])
.
'" value="'
.
$this
->
t
(
'select'
)
.
'" /></p>'
);
echo
'</div>'
;
}
foreach
(
$this
->
data
[
'idplist'
]
AS
$idpentry
)
{
if
(
$idpentry
[
'entityid'
]
!=
$this
->
data
[
'preferredidp'
])
{
if
(
array_key_exists
(
'icon'
,
$idpentry
)
&&
$idpentry
[
'icon'
]
!==
NULL
)
{
$iconUrl
=
\SimpleSAML\Utils\HTTP
::
resolveURL
(
$idpentry
[
'icon'
]);
echo
'<img class="float-l" style="clear: both; margin: 1em; padding: 3px; border: 1px solid #999" src="'
.
htmlspecialchars
(
$iconUrl
)
.
'" />'
;
}
echo
"
\n
"
.
' <h3 style="margin-top: 8px">'
.
htmlspecialchars
(
$this
->
t
(
'idpname_'
.
$idpentry
[
'entityid'
]))
.
'</h3>'
;
if
(
!
empty
(
$idpentry
[
'description'
]))
{
echo
' <p>'
.
htmlspecialchars
(
$this
->
t
(
'idpdesc_'
.
$idpentry
[
'entityid'
]))
.
'<br />'
;
}
echo
(
'<input type="submit" name="idp_'
.
htmlspecialchars
(
$idpentry
[
'entityid'
])
.
'" value="'
.
$this
->
t
(
'select'
)
.
'" /></p>'
);
}
}
?>
</form>
<h2>
<?php
echo
$this
->
data
[
'header'
];
?>
</h2>
<form
method=
"get"
action=
"
<?php
echo
$this
->
data
[
'urlpattern'
];
?>
"
>
<input
type=
"hidden"
name=
"entityID"
value=
"
<?php
echo
htmlspecialchars
(
$this
->
data
[
'entityID'
]);
?>
"
/>
<input
type=
"hidden"
name=
"return"
value=
"
<?php
echo
htmlspecialchars
(
$this
->
data
[
'return'
]);
?>
"
/>
<input
type=
"hidden"
name=
"returnIDParam"
value=
"
<?php
echo
htmlspecialchars
(
$this
->
data
[
'returnIDParam'
]);
?>
"
/>
<p>
<?php
echo
$this
->
t
(
'selectidp_full'
);
if
(
$this
->
data
[
'rememberenabled'
])
{
echo
'<br /><input type="checkbox" name="remember" value="1" title="'
.
$this
->
t
(
'remember'
)
.
'" />'
.
$this
->
t
(
'remember'
);
}
?>
</p>
<?php
if
(
!
empty
(
$this
->
data
[
'preferredidp'
])
&&
array_key_exists
(
$this
->
data
[
'preferredidp'
],
$this
->
data
[
'idplist'
])
)
{
$idpentry
=
$this
->
data
[
'idplist'
][
$this
->
data
[
'preferredidp'
]];
echo
'<div class="preferredidp">'
;
echo
' <img src="/'
.
$this
->
data
[
'baseurlpath'
]
.
'resources/icons/experience/gtk-about.64x64.png" class="float-r" alt="'
.
$this
->
t
(
'icon_prefered_idp'
)
.
'" />'
;
if
(
array_key_exists
(
'icon'
,
$idpentry
)
&&
$idpentry
[
'icon'
]
!==
null
)
{
$iconUrl
=
\SimpleSAML\Utils\HTTP
::
resolveURL
(
$idpentry
[
'icon'
]);
echo
'<img class="float-l" style="margin: 1em; padding: 3px; border: 1px solid #999" src="'
.
htmlspecialchars
(
$iconUrl
)
.
'" />'
;
}
echo
"
\n
"
.
' <h3 style="margin-top: 8px">'
.
htmlspecialchars
(
$this
->
t
(
'idpname_'
.
$idpentry
[
'entityid'
]))
.
'</h3>'
;
if
(
!
empty
(
$idpentry
[
'description'
]))
{
echo
' <p>'
.
htmlspecialchars
(
$this
->
t
(
'idpdesc_'
.
$idpentry
[
'entityid'
]))
.
'<br />'
;
}
echo
(
'<button id="preferredidp" type="submit" class="btn" name="idp_'
.
htmlspecialchars
(
$idpentry
[
'entityid'
])
.
'">'
.
$this
->
t
(
'select'
)
.
'</button>"</p>'
);
echo
'</div>'
;
}
foreach
(
$this
->
data
[
'idplist'
]
as
$idpentry
)
{
if
(
$idpentry
[
'entityid'
]
!=
$this
->
data
[
'preferredidp'
])
{
if
(
array_key_exists
(
'icon'
,
$idpentry
)
&&
$idpentry
[
'icon'
]
!==
null
)
{
$iconUrl
=
\SimpleSAML\Utils\HTTP
::
resolveURL
(
$idpentry
[
'icon'
]);
echo
'<img class="float-l" style="clear: both; margin: 1em; padding: 3px; border: 1px solid #999"'
.
' src="'
.
htmlspecialchars
(
$iconUrl
)
.
'" />'
;
}
echo
"
\n
"
.
' <h3 style="margin-top: 8px">'
.
htmlspecialchars
(
$this
->
t
(
'idpname_'
.
$idpentry
[
'entityid'
]));
echo
'</h3>'
;
if
(
!
empty
(
$idpentry
[
'description'
]))
{
echo
' <p>'
.
htmlspecialchars
(
$this
->
t
(
'idpdesc_'
.
$idpentry
[
'entityid'
]))
.
'<br />'
;
}
echo
'<button type="submit" class="btn" name="idp_'
.
htmlspecialchars
(
$idpentry
[
'entityid'
])
.
'">'
.
$this
->
t
(
'select'
)
.
'</button></p>'
;
}
}
?>
</form>
<?php
$this
->
includeAtTemplateBase
(
'includes/footer.php'
);
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