4include_once 
'Auth/Container.php';
 
   26                parent::__construct();
 
   38        public function fetchData($a_username,$a_password,$isChallengeResponse = 
false)
 
   42                $ilLog->write(__METHOD__.
': Fetch Data called');
 
   44                $response = $this->settings->getConsumer()->complete($this->settings->getReturnLocation());
 
   46                switch($response->status)
 
   49                                die(
"Auth cancelled");
 
   52                                die(
"Auth failed with message: ".$response->message);
 
   55                                $openid = $response->getDisplayIdentifier();
 
   56                        $esc_identity = htmlentities($openid);
 
   57                                $ilLog->write(__METHOD__.
': Auth success with identity '.$esc_identity);
 
   59                        if($response->endpoint->canonicalID) 
 
   61                        $escaped_canonicalID = htmlentities($response->endpoint->canonicalID);
 
   62                                        $ilLog->write(__METHOD__.
': Auth success with canonical id: '.$esc_identity);
 
   65                                include_once 
'Auth/OpenID/SReg.php';
 
   71                                $this->response_data = $sreg_resp->contents();
 
   74                                        $ilLog->write(__METHOD__.
' auth data: '.print_r($this->response_data,
true));
 
   80                                        foreach($response->message->args->keys as $key => $mapping)
 
   82                                                if($mapping[1] == 
'sreg.nickname')
 
   84                                                        $this->response_data[
'nickname'] = $response->message->args->values[$key];                                                      
 
   86                                                if($mapping[1] == 
'sreg.email')
 
   88                                                        $this->response_data[
'email'] = $response->message->args->values[$key];                                                 
 
  107                $this->force_creation = 
true;
 
  118                $GLOBALS[
'ilLog']->write(__METHOD__.
': Login observer called for openid');
 
  123                        $this->response_data[
'nickname']
 
  125                if(!$this->response_data[
'ilInternalAccount'])
 
  127                        if($this->settings->isCreationEnabled())
 
  129                                if($this->settings->isAccountMigrationEnabled() and !$this->force_creation and !
$_SESSION[
'force_creation'])
 
  133                                        $_SESSION[
'tmp_auth_mode_type'] = 
'openid';
 
  134                                        $_SESSION[
'tmp_oid_username'] = urldecode(
$_GET[
'openid_identity']);
 
  136                                        $_SESSION[
'tmp_external_account'] = $this->response_data[
'nickname'];
 
  138                                        $_SESSION[
'tmp_roles'] = array(0 => $this->settings->getDefaultRole());
 
  140                                        $GLOBALS[
'ilLog']->write(__METHOD__.
': Redirect migration');
 
  141                                        ilUtil::redirect(
'ilias.php?baseClass=ilStartUpGUI&cmd=showAccountMigration&cmdClass=ilstartupgui');
 
  144                                include_once 
'./Services/OpenId/classes/class.ilOpenIdAttributeToUser.php';
 
  146                                $new_name = 
$new_user->create($this->response_data[
'nickname'],$this->response_data);
 
  148                                $GLOBALS[
'ilLog']->write(__METHOD__.
': Create user with name:'. $new_name);
 
  149                                $a_auth->setAuth($new_name);
 
  157                                $GLOBALS[
'ilLog']->write(__METHOD__.
': No creation');
 
  164                        $GLOBALS[
'ilLog']->write(__METHOD__.
': Using old name: ' . $this->response_data[
'ilInternalAccount']);
 
  165                        $a_auth->setAuth($this->response_data[
'ilInternalAccount']);
 
  177                include_once 
'./Services/OpenId/classes/class.ilOpenIdSettings.php';
 
  180                $this->settings->initConsumer();
 
const Auth_OpenID_FAILURE
This is the status code completeAuth returns when the value it received indicated an invalid login.
const Auth_OpenID_CANCEL
Status to indicate cancellation of OpenID authentication.
const Auth_OpenID_SUCCESS
Require utility classes and functions for the consumer.
Auth_OpenID_supportsSReg($endpoint)
Does the given endpoint advertise support for simple registration?
static fromSuccessResponse($success_response, $signed_only=true)
Create a C{L{SRegResponse}} object from a successful OpenID library response (C{L{openid....
const AUTH_OPENID_NO_ILIAS_USER
@classDescription Pear auth container for openid
forceCreation($a_status)
Force creation of user accounts.
fetchData($a_username, $a_password, $isChallengeResponse=false)
__construct()
Constructor.
loginObserver($a_username, $a_auth)
initSettings()
Init open id settings.
static _checkExternalAuthAccount($a_auth, $a_account)
check whether external account and authentication method matches with a user
@classDescription Open ID auth class
static getInstance()
Get singleton instance.
static redirect($a_script)
http redirect to other script
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.