ILIAS
Release_3_10_x_branch Revision 61812
|
Class Shibboleth. More...
Public Member Functions | |
ShibAuth ($authParams, $updateUserData=false) | |
Constructor public. | |
getAuth () | |
Checks if the current user is authenticated yet public. | |
setIdle ($time, $add=false) | |
Deletes a role and deletes entries in object_data, rbac_pa, rbac_templates, rbac_ua, rbac_fa public. | |
setExpire ($time, $add=false) | |
Set the maximum expire time. | |
checkAuth () | |
Checks if there is a session with valid auth information. | |
start () | |
Start new auth session. | |
login () | |
Login function. | |
setAuth ($username) | |
Register variable in a session telling that the user has logged in successfully. | |
logout () | |
Logout function. | |
getUsername () | |
Get the username. | |
getStatus () | |
Get the current status. | |
& | _importGlobalVariable ($variable) |
Import variables from special namespaces. | |
generateLogin () | |
Automatically generates the username/screenname of a Shibboleth user or returns the user's already existing username. | |
getFirstString ($string) | |
Cleans and returns first of potential many values (multi-valued attributes) | |
toAscii ($string) | |
Replaces any non-ASCII character by its linguistically most logical substitution. |
Data Fields | |
$username | |
$_sessionName = '_authsession' | |
$status = '' | |
$expire = 0 | |
$idle = 0 | |
$idled = false |
Class Shibboleth.
This class provides basic functionality for Shibboleth authentication
Definition at line 39 of file class.ilShibboleth.php.
& ShibAuth::_importGlobalVariable | ( | $variable | ) |
Import variables from special namespaces.
private
string | Type of variable (server, session, post) |
Definition at line 500 of file class.ilShibboleth.php.
References $_COOKIE, $_GET, $_SESSION, and $GLOBALS.
Referenced by checkAuth(), getAuth(), getUsername(), login(), logout(), and setAuth().
ShibAuth::checkAuth | ( | ) |
Checks if there is a session with valid auth information.
private
Definition at line 166 of file class.ilShibboleth.php.
References _importGlobalVariable(), AUTH_EXPIRED, AUTH_IDLED, and logout().
Referenced by start().
ShibAuth::generateLogin | ( | ) |
Automatically generates the username/screenname of a Shibboleth user or returns the user's already existing username.
private
Definition at line 561 of file class.ilShibboleth.php.
References ilObjUser\_checkExternalAuthAccount(), ilUtil\generatePasswords(), getFirstString(), ilObjUser\getUserIdByLogin(), and toAscii().
Referenced by login().
ShibAuth::getAuth | ( | ) |
Checks if the current user is authenticated yet public.
Definition at line 112 of file class.ilShibboleth.php.
References _importGlobalVariable().
ShibAuth::getFirstString | ( | $string | ) |
Cleans and returns first of potential many values (multi-valued attributes)
private
string | A Shibboleth attribute or other string |
Definition at line 638 of file class.ilShibboleth.php.
Referenced by generateLogin(), and login().
ShibAuth::getStatus | ( | ) |
Get the current status.
public
Definition at line 487 of file class.ilShibboleth.php.
References $status.
ShibAuth::getUsername | ( | ) |
Get the username.
public
Definition at line 472 of file class.ilShibboleth.php.
References $_sessionName, and _importGlobalVariable().
ShibAuth::login | ( | ) |
Login function.
private
Definition at line 230 of file class.ilShibboleth.php.
References $_GET, $_sessionName, $username, _importGlobalVariable(), AUTH_WRONG_LOGIN, generateLogin(), ilUtil\generatePasswords(), getFirstString(), ilObjUser\getUserIdByLogin(), IL_PASSWD_MD5, ilUtil\redirect(), and setAuth().
ShibAuth::logout | ( | ) |
Logout function.
This function clears any auth tokens in the currently active session and executes the logout callback function, if any
public
Definition at line 451 of file class.ilShibboleth.php.
References $_SESSION, $_sessionName, and _importGlobalVariable().
Referenced by checkAuth().
ShibAuth::setAuth | ( | $username | ) |
Register variable in a session telling that the user has logged in successfully.
public
string | Username |
Definition at line 420 of file class.ilShibboleth.php.
References $_SESSION, $_sessionName, $username, and _importGlobalVariable().
Referenced by login().
ShibAuth::setExpire | ( | $time, | |
$add = false |
|||
) |
Set the maximum expire time.
public
integer | time in seconds |
bool | add time to current expire time or not |
Definition at line 151 of file class.ilShibboleth.php.
ShibAuth::setIdle | ( | $time, | |
$add = false |
|||
) |
Deletes a role and deletes entries in object_data, rbac_pa, rbac_templates, rbac_ua, rbac_fa public.
integer | obj_id of role (role_id) |
integer | ref_id of role folder (ref_id) |
Definition at line 133 of file class.ilShibboleth.php.
ShibAuth::ShibAuth | ( | $authParams, | |
$updateUserData = false |
|||
) |
Constructor public.
Definition at line 96 of file class.ilShibboleth.php.
ShibAuth::start | ( | ) |
Start new auth session.
public
Definition at line 215 of file class.ilShibboleth.php.
References checkAuth().
ShibAuth::toAscii | ( | $string | ) |
Replaces any non-ASCII character by its linguistically most logical substitution.
private
string | A Shibboleth attribute or other string |
Definition at line 654 of file class.ilShibboleth.php.
References UtfNormal\toNFKD().
Referenced by generateLogin().
ShibAuth::$_sessionName = '_authsession' |
Definition at line 53 of file class.ilShibboleth.php.
Referenced by getUsername(), login(), logout(), and setAuth().
ShibAuth::$expire = 0 |
Definition at line 70 of file class.ilShibboleth.php.
ShibAuth::$idle = 0 |
Definition at line 82 of file class.ilShibboleth.php.
ShibAuth::$idled = false |
Definition at line 90 of file class.ilShibboleth.php.
ShibAuth::$status = '' |
Definition at line 60 of file class.ilShibboleth.php.
Referenced by getStatus().
ShibAuth::$username |
Definition at line 46 of file class.ilShibboleth.php.