ILIAS
trunk Revision v11.0_alpha-1761-g6dbbfa7b760
|
OAuth based lti authentication. More...
Static Public Member Functions | |
static | getAuthModeByKey (string $a_auth_key) |
Get auth mode by key. More... | |
static | getKeyByAuthMode (string $a_auth_mode) |
Get auth id by auth mode. More... | |
static | getActiveAuthModes () |
get all active authmode server ids More... | |
static | getAuthModes () |
static | lookupConsumer (int $a_sid) |
Lookup consumer title. More... | |
static | getServerIdByAuthMode (string $a_auth_mode) |
Get auth id by auth mode. More... | |
static | isAuthModeLTI (string $a_auth_mode) |
Check if user auth mode is LTI. More... | |
Data Fields | |
const | AUTH_MODE_PREFIX = 'lti' |
Protected Member Functions | |
findAuthKeyId (string $a_oauth_consumer_key) | |
find consumer key id More... | |
findAuthPrefix (int $a_lti_id) | |
find lti id More... | |
findGlobalRole (int $a_lti_id) | |
find global role of consumer More... | |
findUserId (string $a_oauth_user, string $a_oauth_id, string $a_user_prefix) | |
Find user by auth mode and lti id. More... | |
updateUser (int $a_local_user_id, ilLTIPlatform $consumer) | |
update existing user protected More... | |
createUser (ilLTIPlatform $consumer) | |
create new user protected More... | |
handleLocalRoleAssignments (int $user_id, ilLTIPlatform $consumer) | |
![]() | |
handleAuthenticationFail (ilAuthStatus $status, string $a_reason) | |
Handle failed authentication. More... | |
Private Attributes | |
ilLTIDataConnector | $dataConnector = null |
string | $lti_context_id = "" |
int | $ref_id = 0 |
ilLTITool | $provider = null |
array | $messageParameters = null |
Additional Inherited Members | |
![]() | |
__construct (ilAuthCredentials $credentials) | |
Constructor. More... | |
getLogger () | |
Get logger. More... | |
getCredentials () | |
![]() | |
doAuthentication (\ilAuthStatus $status) | |
Do authentication. More... | |
OAuth based lti authentication.
Definition at line 27 of file class.ilAuthProviderLTI.php.
|
protected |
create new user protected
ilLTIPlatform | $consumer |
ilPasswordException | |
ilUserException |
Definition at line 418 of file class.ilAuthProviderLTI.php.
References $DIC, $GLOBALS, ilAuthUtils\_generateLogin(), ilAuthProvider\getCredentials(), ilLTIPlatform\getExtConsumerId(), ilLTIPlatform\getLanguage(), ilAuthProvider\getLogger(), ilLTIPlatform\getPrefix(), ilLTIPlatform\getRole(), ilUtil\now(), null, and ilObjUser\PASSWD_CRYPTED.
Referenced by findGlobalRole().
|
protected |
find consumer key id
string | $a_oauth_consumer_key |
Definition at line 147 of file class.ilAuthProviderLTI.php.
References $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, and ilAuthProvider\getLogger().
|
protected |
find lti id
int | $a_lti_id |
Definition at line 173 of file class.ilAuthProviderLTI.php.
References $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, and ilAuthProvider\getLogger().
|
protected |
find global role of consumer
int | $a_lti_id |
Definition at line 195 of file class.ilAuthProviderLTI.php.
References $DIC, $ilDB, $post, $ref_id, $res, ilAuthProvider\$status, ilObject\_lookupType(), createUser(), ilAuthProviderInterface\doAuthentication(), ilDBConstants\FETCHMODE_OBJECT, findUserId(), ilSession\get(), ilAuthProvider\getCredentials(), ilAuthProvider\getLogger(), handleLocalRoleAssignments(), ILIAS\Repository\int(), null, ilSession\set(), ilAuthStatus\setAuthenticatedUserId(), ilAuthStatus\setReason(), ilAuthStatus\setStatus(), ilAuthStatus\STATUS_AUTHENTICATED, ilAuthStatus\STATUS_AUTHENTICATION_FAILED, and updateUser().
|
protected |
Find user by auth mode and lti id.
string | $a_oauth_user | |
string | $a_oauth_id | |
string | $a_user_prefix |
Definition at line 350 of file class.ilAuthProviderLTI.php.
References ilAuthProvider\$user_id, ilObjUser\_checkExternalAuthAccount(), ilObjUser\_lookupId(), and ilAuthProvider\getLogger().
Referenced by findGlobalRole().
|
static |
get all active authmode server ids
Definition at line 68 of file class.ilAuthProviderLTI.php.
References $ilDB, $res, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilAuthUtils\_isExternalAccountEnabled().
|
static |
Get auth mode by key.
string | $a_auth_mode |
Definition at line 41 of file class.ilAuthProviderLTI.php.
Referenced by ilAuthUtils\_getAuthModeName().
|
static |
Definition at line 86 of file class.ilAuthProviderLTI.php.
References $ilDB, $res, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilAuthUtils\_getActiveAuthModes(), and ilAuthUtils\_getAllAuthModes().
|
static |
Get auth id by auth mode.
string | $a_auth_mode |
Definition at line 55 of file class.ilAuthProviderLTI.php.
References ilAuthUtils\AUTH_PROVIDER_LTI.
Referenced by ilAuthUtils\_getAuthMode().
|
static |
Get auth id by auth mode.
string | $a_auth_mode |
Definition at line 118 of file class.ilAuthProviderLTI.php.
References null.
Referenced by ilAuthUtils\getAuthModeTranslation().
|
protected |
Definition at line 526 of file class.ilAuthProviderLTI.php.
References $DIC, $GLOBALS, $ref_id, ilAuthProvider\$user_id, ilLTIPlatform\getExtConsumerId(), and ilAuthProvider\getLogger().
Referenced by findGlobalRole().
|
static |
Check if user auth mode is LTI.
string | $a_auth_mode |
Definition at line 132 of file class.ilAuthProviderLTI.php.
References ilAuthUtils\AUTH_PROVIDER_LTI, and ilLoggerFactory\getLogger().
|
static |
Lookup consumer title.
int | $a_sid |
Definition at line 106 of file class.ilAuthProviderLTI.php.
References ilLTIPlatform\fromRecordId().
Referenced by ilAuthUtils\getAuthModeTranslation().
|
protected |
update existing user protected
int | $a_local_user_id | |
ilLTIPlatform | $consumer |
Definition at line 371 of file class.ilAuthProviderLTI.php.
References $DIC, $GLOBALS, ilAuthProvider\getLogger(), and ilLTIPlatform\getRole().
Referenced by findGlobalRole().
|
private |
Definition at line 30 of file class.ilAuthProviderLTI.php.
|
private |
Definition at line 31 of file class.ilAuthProviderLTI.php.
|
private |
Definition at line 34 of file class.ilAuthProviderLTI.php.
Definition at line 33 of file class.ilAuthProviderLTI.php.
|
private |
Definition at line 32 of file class.ilAuthProviderLTI.php.
Referenced by findGlobalRole(), and handleLocalRoleAssignments().
const ilAuthProviderLTI::AUTH_MODE_PREFIX = 'lti' |
Definition at line 29 of file class.ilAuthProviderLTI.php.