ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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.

Parameters
objectAuth_ContainerBase
arrayfurther options Not used in the moment

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

References $container.

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  }
$container
Definition: wac.php:13

Member Function Documentation

◆ assignData()

ilAuthHTTP::assignData ( )

Overwritten to allow passwordless mount-instructions.

Returns

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

References $_GET, and $GLOBALS.

71  {
72  if (isset($_GET['mount-instructions'])) {
73  $GLOBALS['DIC']['ilLog']->write('Trying authentication as anonymous for displaying mount instructions');
74  $this->username = 'anonymous';
75  $this->password = 'anonymous';
76  } else {
77  parent::assignData();
78  }
79  }
$_GET["client_id"]
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.

◆ 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 87 of file class.ilAuthHTTP.php.

References $GLOBALS.

88  {
89  // First, call parent observer and
90  if (!parent::failedLoginObserver($a_username, $a_auth)) {
91  $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': HTTP authentication failed. Sending status 401');
92  $this->drawLogin($a_username);
93  return false;
94  }
95  return false;
96  }
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.

◆ supportsRedirects()

ilAuthHTTP::supportsRedirects ( )

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

Returns

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: