Assembla home | Assembla project page
 

Changeset 120

Show
Ignore:
Timestamp:
07/19/07 14:15:45 (1 year ago)
Author:
digitalspaghetti
Message:

Began working on implementing OpenID login

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branch/config/core.php

    r119 r120  
    5555 * In development mode, you need to click the flash message to continue. 
    5656 */ 
    57         define('DEBUG', 0); 
     57        define('DEBUG', 2); 
    5858/** 
    5959 * Turn off or enable cache checking application-wide. 
  • branch/controllers/users_controller.php

    r119 r120  
    127127                if( isset ( $this->data ) ) 
    128128                { 
    129                         $this->Session->del('element_data.Nav'); 
    130                         if ($this->Conf->get('general.enable_captcha')) 
     129                        if (isset ($this->data['User']['username']) ) 
    131130                        { 
    132                                 if (!$this->Session->read('captcha') == $this->data['User']['captcha_check'] ) 
     131                                $this->Session->del('element_data.Nav'); 
     132                                if ($this->Conf->get('general.enable_captcha')) 
    133133                                { 
    134                                         return false; 
     134                                        if (!$this->Session->read('captcha') == $this->data['User']['captcha_check'] ) 
     135                                        { 
     136                                                return false; 
     137                                        } 
    135138                                } 
     139                                $auth_num = $this->othAuth->login($this->data['User']); 
     140                                $this->set('auth_msg', $this->othAuth->getMsg($auth_num)); 
     141                        } else if ($this->data['User']['openid']) { 
     142                                $this->Session->del('element_data.Nav'); 
     143                                $this->Openid->authenticate($this->data['User']['openid'], 'http://'.$_SERVER['SERVER_NAME'].'/users/login', 'http://'.$_SERVER['SERVER_NAME']); 
    136144                        } 
    137                         $auth_num = $this->othAuth->login($this->data['User']); 
    138                         $this->set('auth_msg', $this->othAuth->getMsg($auth_num)); 
     145                } else { 
     146                        if (count($_GET) > 1) 
     147                        { 
     148                $response = $this->Openid->getResponse(); 
     149 
     150                if ($response->status == Auth_OpenID_SUCCESS) { 
     151                        $this->log($response); 
     152                        if ($this->User->findByOpenid($response->signed_args['openid.identity']) ) { 
     153                                                $this->Session->setFlash('User Authenticated Success'); 
     154                                                //$this->Session->write('username', $response->signed_args['openid.sreg.nickname']); 
     155                                                $this->redirect('/'); 
     156                                        } else { 
     157                                                $this->Session->setFlash("Can't Find"); 
     158                                                $this->redirect('/'); 
     159                                        } 
     160                } 
     161                } 
    139162                } 
    140163        } 
  • branch/vendors/Auth/OpenID/Consumer.php

    r119 r120  
    212212define('Auth_OpenID_DEFAULT_NONCE_CHRS',"abcdefghijklmnopqrstuvwxyz" . 
    213213       "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"); 
    214         
     214 
     215/** 
     216 * Dumb math - Added by Tane 
     217 */ 
     218define('Auth_OpenID_NO_MATH_SUPPORT', true); 
    215219/** 
    216220 * An OpenID consumer implementation that performs discovery and does 
  • branch/webroot/css/jquery.tabs.css

    r119 r120  
    9090    border-top: 1px solid #97a5b0; 
    9191    padding: 1em 8px; 
    92     background: #45484B; /* declare background color for container to avoid distorted fonts in IE while fading */ 
     92    background: #36393B; /* declare background color for container to avoid distorted fonts in IE while fading */ 
    9393} 
    9494.tabs-loading em {