Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
StudipAuthLTI Class Reference
Inheritance diagram for StudipAuthLTI:
StudipAuthSSO StudipAuthAbstract

Public Member Functions

 verifyUsername ($username)
 
 isAuthenticated ($username, $password)
 
 authenticateUser ($username, $password)
 
 getUser ()
 
 getUserDomains ()
 
 getUserData ($key)
 
- Public Member Functions inherited from StudipAuthSSO
 getUser ()
 
 isAuthenticated ($username, $password)
 
 isUsedUsername ($username)
 
- Public Member Functions inherited from StudipAuthAbstract
 __construct ($config=[])
 
 authenticateUser ($username, $password)
 
 getStudipUser ($username)
 
 doNewUserInit ($user)
 
 setUserDomains ($user)
 
 getUserDomains ()
 
 doDataMapping ($user)
 
 isMappedField ($name)
 
 verifyUsername ($username)
 
 isUsedUsername ($username)
 
 isAuthenticated ($username, $password)
 
 __isset ($offset)
 
 __set ($offset, $value)
 
 __get ($offset)
 
 __unset ($offset)
 

Data Fields

 $consumer_keys
 
 $username
 
 $domain
 
- Data Fields inherited from StudipAuthSSO
 $plugin_fullname
 
 $login_description
 
- Data Fields inherited from StudipAuthAbstract
 $error_msg
 
 $is_new_user = false
 
 $user_domains
 
 $user_data_mapping = null
 
 $plugin_name
 
 $error_head
 

Additional Inherited Members

- Static Public Member Functions inherited from StudipAuthAbstract
static getInstance ($plugin_name=false)
 
static CheckAuthentication ($username, $password)
 
static CheckUsername ($username)
 
static CheckField ($field_name, $plugin_name)
 
static CheckIPRange ()
 
static CheckIPRangeV4 ($ip, $range)
 
static CheckIPRangeV6 ($ip, $range)
 

Member Function Documentation

authenticateUser (   $username,
  $password 
)

Authenticate this user and handle auto enrollment. If the URL parameter "sem_id" is set, the user is automatically redircted to the enrollment action for this course.

Parameters
string$usernamethe username to check
string$passwordthe password (ignored)
Returns
mixed if authentication succeeds: the Stud.IP user, else false
Exceptions
OAuthException2if the signature verification failed
getUser ( )

Return the current username of the pending authentication request.

getUserData (   $key)

Callback that can be used in user_data_mapping array. For LTI, this is equivalent to Request::get(), since all launch data is POST parameters.

See Also
http://www.imsglobal.org/specs/ltiv1p1/implementation-guide
Parameters
stringkey (e.g. "lis_person_contact_email_primary")
Returns
string parameter value (null if not set)
getUserDomains ( )

Get the user domains to assign to the current user (if any).

Returns
array array of user domain names
isAuthenticated (   $username,
  $password 
)

Check whether this user can be authenticated. Since we trust the user information sent by the LTI consumer, only the OAuth signature is checked.

Parameters
string$usernameaccount name
string$password(ignored)
Returns
bool true if authentication succeeds
Exceptions
OAuthException2if the signature verification failed
verifyUsername (   $username)

Validate the username passed to the auth plugin. Note: This implementation ignores the username parameter and always uses the data passed via the LTI parameters "lis_person_sourcedid" or "user_id".

Parameters
string$username(ignored)
Returns
string username derived from LTI parameters
Exceptions
InvalidArgumentExceptionif no username can be determined

Field Documentation

$consumer_keys
$domain

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