[geeklog-cvs] geeklog: Added support for remote services on token expiry ("3rd...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Dec 29 08:00:28 EST 2009
changeset 7541:b0a8ca4b2947
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/b0a8ca4b2947
user: Dirk Haun <dirk at haun-online.de>
date: Sun Dec 20 16:52:42 2009 +0100
description:
Added support for remote services on token expiry ("3rdparty" only - OpenID doesn't work)
diffstat:
system/lib-security.php | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
diffs (40 lines):
diff -r 4f71cb249199 -r b0a8ca4b2947 system/lib-security.php
--- a/system/lib-security.php Sun Dec 20 16:51:30 2009 +0100
+++ b/system/lib-security.php Sun Dec 20 16:52:42 2009 +0100
@@ -1172,7 +1172,35 @@
$user_templates->set_var('start_block_loginagain', COM_startBlock('Security Token Expired'));
$user_templates->set_var('end_block', COM_endBlock());
- $services = ''; // TBD: add services dropdown
+ $services = ''; // 3rd party remote authentification.
+ if ($_CONF['user_login_method']['3rdparty'] && !$_CONF['usersubmission']) {
+ $modules = SEC_collectRemoteAuthenticationModules();
+ if (count($modules) > 0) {
+ if (!$_CONF['user_login_method']['standard'] &&
+ (count($modules) == 1)) {
+ $select = '<input type="hidden" name="service" value="'
+ . $modules[0] . '"' . XHTML . '>' . $modules[0];
+ } else {
+ // Build select
+ $select = '<select name="service">';
+ if ($_CONF['user_login_method']['standard']) {
+ $select .= '<option value="">' . $_CONF['site_name']
+ . '</option>';
+ }
+ foreach ($modules as $service) {
+ $select .= '<option value="' . $service . '">' . $service
+ . '</option>';
+ }
+ $select .= '</select>';
+ }
+
+ $user_templates->set_file('services', 'services.thtml');
+ $user_templates->set_var('lang_service', $LANG04[121]);
+ $user_templates->set_var('select_service', $select);
+ $user_templates->parse('output', 'services');
+ $services = $user_templates->finish($user_templates->get_var('output'));
+ }
+ }
// (ab)use {services} for some hidden fields
$services .= '<input type="hidden" name="mode" value="tokenexpired"'
More information about the geeklog-cvs
mailing list