ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAuthFrontendCredentialsSoap Class Reference
+ Inheritance diagram for ilAuthFrontendCredentialsSoap:
+ Collaboration diagram for ilAuthFrontendCredentialsSoap:

Public Member Functions

 __construct (ServerRequestInterface $httpRequest, ilCtrlInterface $ctrl, ilSetting $settings)
 
 tryAuthenticationOnLoginPage ()
 Check if an authentication attempt should be done when login page has been called. More...
 
- Public Member Functions inherited from ilAuthFrontendCredentials
 __construct ()
 
 setUsername (string $a_name)
 
 getUsername ()
 
 setPassword (string $a_password)
 
 getPassword ()
 
 setAuthMode (string $a_auth_mode)
 
 getAuthMode ()
 
 setUsername (string $a_name)
 
 getUsername ()
 
 setPassword (string $a_password)
 
 getPassword ()
 
 setAuthMode (string $a_auth_mode)
 
 getAuthMode ()
 

Private Attributes

ServerRequestInterface $httpRequest
 
ilCtrlInterface $ctrl
 
ilSetting $settings
 
ilAuthSession $authSession
 
ilGlobalTemplateInterface $main_tpl
 

Additional Inherited Members

- Protected Attributes inherited from ilAuthFrontendCredentials
ilLogger $logger
 

Detailed Description

Definition at line 23 of file class.ilAuthFrontendCredentialsSoap.php.

Constructor & Destructor Documentation

◆ __construct()

ilAuthFrontendCredentialsSoap::__construct ( ServerRequestInterface  $httpRequest,
ilCtrlInterface  $ctrl,
ilSetting  $settings 
)

Definition at line 31 of file class.ilAuthFrontendCredentialsSoap.php.

32 {
33 global $DIC;
34 $this->main_tpl = $DIC->ui()->mainTemplate();
35 $this->authSession = $DIC['ilAuthSession'];
36 $this->httpRequest = $httpRequest;
37 $this->ctrl = $ctrl;
38 $this->settings = $settings;
40 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $ctrl, $DIC, $httpRequest, $settings, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ tryAuthenticationOnLoginPage()

ilAuthFrontendCredentialsSoap::tryAuthenticationOnLoginPage ( )

Check if an authentication attempt should be done when login page has been called.

Definition at line 45 of file class.ilAuthFrontendCredentialsSoap.php.

45 : void
46 {
47 $passedSso = '';
48 if (isset($this->httpRequest->getQueryParams()['passed_sso']) && is_string($this->httpRequest->getQueryParams()['passed_sso'])) {
49 $passedSso = $this->httpRequest->getQueryParams()['passed_sso'];
50 }
51
52 if (!empty($passedSso)) {
53 return;
54 }
55
56 if (!$this->settings->get('soap_auth_active', '')) {
57 return;
58 }
59
60 if (empty($this->getUsername()) || empty($this->getPassword())) {
61 return;
62 }
63
64 $this->logger->debug('Using SOAP authentication.');
65
66 $status = ilAuthStatus::getInstance();
67
68 $provider = new ilAuthProviderSoap($this);
69
70 $frontend_factory = new ilAuthFrontendFactory();
71 $frontend_factory->setContext(ilAuthFrontendFactory::CONTEXT_STANDARD_FORM);
72 $frontend = $frontend_factory->getFrontend(
73 $this->authSession,
74 $status,
75 $this,
76 [$provider]
77 );
78 $frontend->authenticate();
79
80 switch ($status->getStatus()) {
82 ilLoggerFactory::getLogger('auth')->debug(
83 'Redirecting to default starting page.'
84 );
86 break;
87
89 $this->main_tpl->setOnScreenMessage('failure', $status->getTranslatedReason(), true);
90 $this->ctrl->redirectToURL(ilUtil::appendUrlParameterString(
91 $this->ctrl->getLinkTargetByClass('ilStartupGUI', 'showLoginPage', '', false, false),
92 'passed_sso=1'
93 ));
94 break;
95 }
96 }
const int CONTEXT_STANDARD_FORM
Authentication with id and password.
const int STATUS_AUTHENTICATION_FAILED
const int STATUS_AUTHENTICATED
static getInstance()
Get status instance.
static redirectToStartingPage(string $target='')
static getLogger(string $a_component_id)
Get component logger.
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
$provider
Definition: ltitoken.php:80

References $provider, ilUtil\appendUrlParameterString(), ilAuthFrontendFactory\CONTEXT_STANDARD_FORM, ILIAS\Repository\ctrl(), ilAuthStatus\getInstance(), ilLoggerFactory\getLogger(), ilAuthFrontendCredentials\getPassword(), ilAuthFrontendCredentials\getUsername(), ILIAS\Repository\logger(), ilInitialisation\redirectToStartingPage(), ILIAS\Repository\settings(), ilAuthStatus\STATUS_AUTHENTICATED, and ilAuthStatus\STATUS_AUTHENTICATION_FAILED.

+ Here is the call graph for this function:

Field Documentation

◆ $authSession

ilAuthSession ilAuthFrontendCredentialsSoap::$authSession
private

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

◆ $ctrl

ilCtrlInterface ilAuthFrontendCredentialsSoap::$ctrl
private

Definition at line 26 of file class.ilAuthFrontendCredentialsSoap.php.

Referenced by __construct().

◆ $httpRequest

ServerRequestInterface ilAuthFrontendCredentialsSoap::$httpRequest
private

Definition at line 25 of file class.ilAuthFrontendCredentialsSoap.php.

Referenced by __construct().

◆ $main_tpl

ilGlobalTemplateInterface ilAuthFrontendCredentialsSoap::$main_tpl
private

Definition at line 29 of file class.ilAuthFrontendCredentialsSoap.php.

◆ $settings

ilSetting ilAuthFrontendCredentialsSoap::$settings
private

Definition at line 27 of file class.ilAuthFrontendCredentialsSoap.php.

Referenced by __construct().


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