ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAuthFrontendCredentialsLTI Class Reference

Auth credentials for lti oauth based authentication. More...

+ Inheritance diagram for ilAuthFrontendCredentialsLTI:
+ Collaboration diagram for ilAuthFrontendCredentialsLTI:

Public Member Functions

 __construct ()
 
 initFromRequest ()
 Init credentials from request. 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 ()
 

Additional Inherited Members

- Protected Attributes inherited from ilAuthFrontendCredentials
ilLogger $logger
 

Detailed Description

Auth credentials for lti oauth based authentication.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

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

Constructor & Destructor Documentation

◆ __construct()

ilAuthFrontendCredentialsLTI::__construct ( )

Reimplemented from ilAuthFrontendCredentials.

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

30 {
32 // overwrite default lti logger
33 // $this->setLogger($GLOBALS['DIC']->logger()->lti());
34 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ initFromRequest()

ilAuthFrontendCredentialsLTI::initFromRequest ( )

Init credentials from request.

Definition at line 41 of file class.ilAuthFrontendCredentialsLTI.php.

41 : void
42 {
43 global $DIC;
45 $logger->debug('New lti authentication request...');
46 $user_id = '';
47 if ($DIC->http()->wrapper()->post()->has('login_hint')) {
48 $logger->debug('LTI 1.3 initiate login...');
49 $user_id = $DIC->http()->wrapper()->post()->retrieve('login_hint', $DIC->refinery()->kindlyTo()->string());
50 ilSession::set("lti13_initiate_login", $user_id);
51 }
52 if ($DIC->http()->wrapper()->post()->has('user_id')) {
53 $user_id = $DIC->http()->wrapper()->post()->retrieve('user_id', $DIC->refinery()->kindlyTo()->string());
54 }
55 if (empty($user_id) && ilSession::has("lti13_initiate_login")) {
56 $user_id = ilSession::get("lti13_initiate_login");
57 ilSession::clear("lti13_initiate_login");
58 }
59 // ToDo: Error Handling
60 // if (empty($user_id)) {}
61 $this->setUsername($user_id);
62 }
static getLogger(string $a_component_id)
Get component logger.
debug(string $message, array $context=[])
static get(string $a_var)
static clear(string $a_var)
static set(string $a_var, $a_val)
Set a value.
static has($a_var)
global $DIC
Definition: shib_login.php:26

References $DIC, ilAuthFrontendCredentials\$logger, $user_id, ilSession\clear(), ilLogger\debug(), ilSession\get(), ilLoggerFactory\getLogger(), ilSession\has(), ilSession\set(), and ilAuthFrontendCredentials\setUsername().

+ Here is the call graph for this function:

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