ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
BasicAuthentication.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use Sabre\DAV\Auth\Plugin;
24use Sabre\DAV\Auth\Backend\BasicCallBack;
27
31class BasicAuthentication extends Plugin
32{
33 public function __construct(
34 SecretKeyRotation $secret_key_rotation,
35 \ilLogger $logger,
36 \ilObjUser $user,
37 \ilAuthSession $auth_session,
38 Filesystem $filesystem
39 ) {
40 $webdav_auth = new ILIASAuthenticationCallback(
41 $user,
42 $auth_session,
43 $logger,
44 $filesystem,
45 $secret_key_rotation
46 );
47 $auth_callback_class = new BasicCallBack(
48 fn(string $username, string $password): bool => $webdav_auth->authenticate($username, $password)
49 );
50
52 $auth_callback_class
53 );
54 }
55
56}
Key rotation can provide an extra layer of mitigation against an attacker discovering a secret key.
__construct(SecretKeyRotation $secret_key_rotation, \ilLogger $logger, \ilObjUser $user, \ilAuthSession $auth_session, Filesystem $filesystem)
Component logger with individual log levels by component id.
User class.
The filesystem interface provides the public interface for the Filesystem service API consumer.
Definition: Filesystem.php:37
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc