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

Go to the source code of this file.

Variables

 $userList
 This example shows how to do Basic authentication. More...
 
 user2
 
 $paths
 
foreach($paths as $path) $request = Sapi::getRequest()
 
 $response = new Response()
 
 $basicAuth = new Auth\Basic("Locked down area", $request, $response)
 
if(! $userPass=$basicAuth->getCredentials()) elseif(!isset($userList[$userPass[0]])|| $userList[$userPass[0]] !==$userPass[1]) else
 

Variable Documentation

◆ $basicAuth

$basicAuth = new Auth\Basic("Locked down area", $request, $response)

Definition at line 37 of file basicauth.php.

Referenced by Monolog\Handler\CouchDBHandler\write().

◆ $paths

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

Definition at line 20 of file basicauth.php.

◆ $request

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

Definition at line 34 of file basicauth.php.

◆ $response

$response = new Response()

Definition at line 35 of file basicauth.php.

◆ $userList

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

This example shows how to do Basic authentication.

Definition at line 10 of file basicauth.php.

◆ else

if (! $userPass=$basicAuth->getCredentials()) elseif (!isset( $userList[ $userPass[0]])||$userList[ $userPass[0]] !==$userPass[1]) else
Initial value:
{
$response->setBody('You are logged in!')
$response
Definition: basicauth.php:35

Definition at line 47 of file basicauth.php.

◆ user2

user2
Initial value:
=> "password",
]

Definition at line 12 of file basicauth.php.

Referenced by Sabre\CalDAV\Schedule\ScheduleDeliverTest\testDeletedInvite(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testDeletedInviteSchedulingDisabled(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testDeletedInviteWrongUrl(), Sabre\CalDAV\Schedule\DeliverNewEventTest\testDelivery(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testInviteNoACLPlugin(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testInviteNoCalendarHomeSet(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testInviteNoDefaultCalendar(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testInviteNoInboxUrl(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testInviteNoScheduler(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testNewInvite(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testNewInviteSchedulingDisabled(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testNewOnWrongCollection(), Sabre\CalDAV\Schedule\FreeBusyRequestTest\testNoCalendarHomeFound(), Sabre\CalDAV\Schedule\FreeBusyRequestTest\testNoDTStart(), Sabre\CalDAV\Schedule\FreeBusyRequestTest\testNoInboxFound(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testReply(), Sabre\CalDAV\Schedule\FreeBusyRequestTest\testSucceed(), Sabre\CalDAV\Schedule\FreeBusyRequestTest\testSucceedNoCalendars(), Sabre\CalDAV\Schedule\FreeBusyRequestTest\testSucceedUseVAVAILABILITY(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testUnbindIgnoredOnMove(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testUpdatedInvite(), Sabre\CalDAV\Schedule\ScheduleDeliverTest\testUpdatedInviteSchedulingDisabled(), and Sabre\CalDAV\Schedule\ScheduleDeliverTest\testUpdatedInviteWrongPath().