ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ilOIDCAuthStrategy Class Reference
+ Inheritance diagram for ilOIDCAuthStrategy:
+ Collaboration diagram for ilOIDCAuthStrategy:

Public Member Functions

 __construct (private readonly ilCtrlInterface $ctrl, private readonly ilLogger $logger)
 
 isActive ()
 
 getName ()
 
 handleLogin (string $redirection_target)
 
 isActive ()
 
 getName ()
 
 handleLogin (string $redirection_target)
 

Detailed Description

Definition at line 20 of file class.ilOIDCAuthStrategy.php.

Constructor & Destructor Documentation

◆ __construct()

ilOIDCAuthStrategy::__construct ( private readonly ilCtrlInterface  $ctrl,
private readonly ilLogger  $logger 
)

Definition at line 22 of file class.ilOIDCAuthStrategy.php.

25 {
26 }

Member Function Documentation

◆ getName()

ilOIDCAuthStrategy::getName ( )

Reimplemented from ilECSAuthStrategy.

Definition at line 33 of file class.ilOIDCAuthStrategy.php.

33 : string
34 {
35 return 'oidc';
36 }

◆ handleLogin()

ilOIDCAuthStrategy::handleLogin ( string  $redirection_target)

Reimplemented from ilECSAuthStrategy.

Definition at line 38 of file class.ilOIDCAuthStrategy.php.

38 : void
39 {
40 // the target may be '/goto.php/crs/123' which is not supported by oidc (see `LegacyGotoHandler::handle`)
41 // instead it should be 'crs_123' and will be built to '/goto.php/?target=crs_123' in oidc login page
42 if (str_contains($redirection_target, 'goto.php/')) {
43 $redirection_target = ltrim(str_replace('goto.php', '', $redirection_target), '/');
44 $redirection_target = str_replace('/', '_', $redirection_target);
45 }
46
47 $this->logger->info('Redirect to oidc authentication');
48 $this->ctrl->redirectToURL('openidconnect.php?target=' . $redirection_target);
49 }

References ILIAS\Repository\ctrl(), and ILIAS\Repository\logger().

+ Here is the call graph for this function:

◆ isActive()

ilOIDCAuthStrategy::isActive ( )

Reimplemented from ilECSAuthStrategy.

Definition at line 28 of file class.ilOIDCAuthStrategy.php.

28 : bool
29 {
30 return ilOpenIdConnectSettings::getInstance()->getActive();
31 }

References ilOpenIdConnectSettings\getInstance().

+ Here is the call graph for this function:

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