ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilAuthContainerCalendarToken.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once 'Auth/Container.php';
5 
16 {
17  protected $current_user_id = 0;
18 
23  public function __construct()
24  {
25  parent::__construct();
26  }
27 
28  public function fetchData($username, $password)
29  {
30  $GLOBALS['ilLog']->write('Fetch data');
31  include_once './Services/Calendar/classes/class.ilCalendarAuthenticationToken.php';
32  $this->current_user_id = ilCalendarAuthenticationToken::lookupUser($_GET['token']);
33 
34  return $this->current_user_id > 0;
35  }
36 
42  public function loginObserver($a_username, $a_auth)
43  {
44  $GLOBALS['ilLog']->write('Called login observer');
45 
46  $name = ilObjUser::_lookupName($this->current_user_id);
47  $a_auth->setAuth($name['login']);
48  return true;
49  }
50 }
static _lookupName($a_user_id)
lookup user name
$_GET["client_id"]
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
$password
Definition: pwgen.php:17
Calendar token based authentication
if($format !==null) $name
Definition: metadata.php:146
loginObserver($a_username, $a_auth)
Called from fetchData after successful login.
static lookupUser($a_token)
Lookup user by hash.