ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilAuthHTTP Class Reference

Base class for ilAuth, ilAuthHTTP .... More...

+ Inheritance diagram for ilAuthHTTP:
+ Collaboration diagram for ilAuthHTTP:

Public Member Functions

 supportsRedirects ()
 Returns true, if the current auth mode allows redirection to e.g to loginScreen, public section... More...
 
 __construct ($container, $a_options=array())
 Constructor. More...
 
 assignData ()
 Overwritten to allow passwordless mount-instructions. More...
 

Protected Member Functions

 failedLoginObserver ($a_username, $a_auth)
 Failed login. More...
 

Detailed Description

Base class for ilAuth, ilAuthHTTP ....

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 36 of file class.ilAuthHTTP.php.

Constructor & Destructor Documentation

◆ __construct()

ilAuthHTTP::__construct (   $container,
  $a_options = array() 
)

Constructor.

@param object Auth_ContainerBase
@param array        further options Not used in the moment

Reimplemented in ilAuthCalendar.

Definition at line 55 of file class.ilAuthHTTP.php.

56 {
57 $a_options['sessionSharing'] = false;
58
59 parent::__construct($container,$a_options);
60 $this->setSessionName("_authhttp".md5(CLIENT_ID));
61 $this->setRealm(CLIENT_ID);
62
63 $this->initAuth();
64 }

Member Function Documentation

◆ assignData()

ilAuthHTTP::assignData ( )

Overwritten to allow passwordless mount-instructions.

Returns

Definition at line 70 of file class.ilAuthHTTP.php.

71 {
72 if(isset($_GET['mount-instructions']))
73 {
74 $GLOBALS['ilLog']->write('Trying authentication as anonymous for displaying mount instructions');
75 $this->username = 'anonymous';
76 $this->password = 'anonymous';
77 }
78 else
79 {
80 parent::assignData();
81 }
82
83 }
$_GET["client_id"]
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

References $_GET, and $GLOBALS.

◆ failedLoginObserver()

ilAuthHTTP::failedLoginObserver (   $a_username,
  $a_auth 
)
protected

Failed login.

=> Draw login (HTTP 401)

Parameters
object$a_username
object$a_auth
Returns

Definition at line 91 of file class.ilAuthHTTP.php.

92 {
93 // First, call parent observer and
94 if(!parent::failedLoginObserver($a_username,$a_auth))
95 {
96 $GLOBALS['ilLog']->write(__METHOD__.': HTTP authentication failed. Sending status 401');
97 $this->drawLogin($a_username);
98 return false;
99 }
100 return false;
101 }

References $GLOBALS.

◆ supportsRedirects()

ilAuthHTTP::supportsRedirects ( )

Returns true, if the current auth mode allows redirection to e.g to loginScreen, public section...

Returns

Reimplemented in ilAuthCalendar.

Definition at line 44 of file class.ilAuthHTTP.php.

45 {
46 return false;
47 }

The documentation for this class was generated from the following file: