ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
4include_once 'Auth/Container.php';
5
16{
17 protected $current_user_id = 0;
18
23 public function __construct()
24 {
25 parent::__construct();
26 }
27
28 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}
$_GET["client_id"]
@classDescription Calendar token based authentication
loginObserver($a_username, $a_auth)
Called from fetchData after successful login.
static lookupUser($a_token)
Lookup user by hash.
static _lookupName($a_user_id)
lookup user name
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276