Changeset 4886
- Timestamp:
- 08/02/11 09:44:07 (13 years ago)
- Location:
- trunk/phpgwapi
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpgwapi/inc/class.auth_ldap.inc.php
r4791 r4886 56 56 } 57 57 /* find the dn for this uid, the uid is not always in the dn */ 58 $attributes = array('uid','dn','givenName','sn','mail','uidNumber','gidNumber'); 59 58 $attributes = array('uid','dn','givenName','sn','mail','uidNumber','gidNumber','usercertificate'); 60 59 $filter = $GLOBALS['phpgw_info']['server']['ldap_search_filter'] ? $GLOBALS['phpgw_info']['server']['ldap_search_filter'] : '(uid=%user)'; 61 60 $filter = str_replace(array('%user','%domain'),array($username,$GLOBALS['phpgw_info']['user']['domain']),$filter); … … 74 73 { 75 74 if($allValues[0]['uid'][0] != $username) 75 { 76 return false; 77 } 78 } 79 if($_SESSION['login_certificate']) 80 { 81 # certificate not equal, not authenticate. 82 if($allValues[0]['usercertificate'][0] != $_SESSION['login_certificate']) 76 83 { 77 84 return false; -
trunk/phpgwapi/inc/class.sessions.inc.php
r3486 r4886 53 53 */ 54 54 var $passwd; 55 55 /** 56 * @var string current user certificate, if present 57 */ 58 var $certificate; 56 59 /** 57 60 * @var int current user db/ldap account id … … 463 466 $this->passwd_type = $passwd_type; 464 467 } 465 468 if($_SESSION['login_certificate']) 469 { 470 $this->certificate = $_SESSION['login_certificate']; 471 } 472 else 473 { 474 $this->certificate = false; 475 } 466 476 $this->clean_sessions(); 467 477 //sessions_::split_login_domain($login,$this->account_lid,$this->account_domain); … … 561 571 return False; 562 572 } 563 564 573 $GLOBALS['phpgw_info']['user'] = $this->user; 565 574 $GLOBALS['phpgw_info']['hooks'] = $this->hooks; 566 575 567 576 $this->appsession('password','phpgwapi',base64_encode($this->passwd)); 577 if($this->certificate) $this->appsession('certificate','phpgwapi',$this->certificate); 568 578 if ($GLOBALS['phpgw']->acl->check('anonymous',1,'phpgwapi')) 569 579 { -
trunk/phpgwapi/templates/default/login_default.php
r4794 r4886 116 116 if(isset($_POST['certificado']) && $_POST['certificado']) 117 117 { 118 119 $_SESSION['login_certificado'] = troca_espaco_por_mais(str_replace(chr(0x0D).chr(0x0A),chr(0x0A),str_replace(chr(0x0A).chr(0x0A),chr(0x0A),$_POST['certificado']))); 118 $_SESSION['login_certificate'] = troca_espaco_por_mais(str_replace(chr(0x0D).chr(0x0A),chr(0x0A),str_replace(chr(0x0A).chr(0x0A),chr(0x0A),$_POST['certificado']))); 120 119 } 121 120 if( isset( $_GET[ 'cd' ] ) && ( $_GET['cd']=='1' || $_GET['cd'] == 10 ) ) -
trunk/phpgwapi/templates/default/navbar.inc.php
r3902 r4886 238 238 . lang('Current users') . ': ' . $GLOBALS['phpgw']->session->total() . '</a>'; 239 239 } 240 $now = time(); 241 $var['user_info'] = '<b>'.$GLOBALS['phpgw']->common->display_fullname() . '</b>'. ' - '240 $now = time(); 241 $var['user_info'] = '<b>'.$GLOBALS['phpgw']->common->display_fullname() . ($GLOBALS['phpgw']->session->appsession('certificate','phpgwapi')?'(' .lang('Identified by Digital Certificate') . ')':'') . '</b>'. ' - ' 242 242 . lang($GLOBALS['phpgw']->common->show_date($now,'l')) . ' ' 243 243 . $GLOBALS['phpgw']->common->show_date($now,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
Note: See TracChangeset
for help on using the changeset viewer.