ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
digestauth.php File Reference

Go to the source code of this file.

Variables

 $userList
 This example shows how to do Digest authentication. More...
 
 user2
 
 $paths
 
foreach($paths as $path) $request = Sapi::getRequest()
 
 $response = new Response()
 
 $digestAuth = new Auth\Digest("Locked down area", $request, $response)
 
if(! $userName=$digestAuth->getUsername()) elseif(!isset($userList[$userName])||! $digestAuth->validatePassword($userList[$userName])) else
 

Variable Documentation

◆ $digestAuth

$digestAuth = new Auth\Digest("Locked down area", $request, $response)

Definition at line 37 of file digestauth.php.

◆ $paths

$paths
Initial value:
= [
__DIR__ . '/../vendor/autoload.php',
__DIR__ . '/../../../autoload.php',
__DIR__ . '/vendor/autoload.php',
]

Definition at line 20 of file digestauth.php.

◆ $request

foreach ( $paths as $path) $request = Sapi::getRequest()

Definition at line 34 of file digestauth.php.

◆ $response

$response = new Response()

Definition at line 35 of file digestauth.php.

◆ $userList

$userList
Initial value:
= [
"user1" => "password"

This example shows how to do Digest authentication.

Definition at line 10 of file digestauth.php.

◆ else

if (! $userName=$digestAuth->getUsername()) elseif (!isset( $userList[ $userName])||! $digestAuth->validatePassword( $userList[ $userName])) else
Initial value:
{
$response->setBody('You are logged in!')
$response
Definition: digestauth.php:35

Definition at line 48 of file digestauth.php.

◆ user2

user2
Initial value:
=> "password",
]

Definition at line 12 of file digestauth.php.