Authentication
[Implementation]


Functions

 CASClient::setUser ($user)
 CASClient::getUser ()
 CASClient::forceAuthentication ()
 CASClient::setCacheTimesForAuthRequest ($n)
 CASClient::checkAuthentication ()
 CASClient::isAuthenticated ()
 CASClient::isSessionAuthenticated ()
 CASClient::wasPreviouslyAuthenticated ()
 CASClient::redirectToCas ($gateway=false)
 CASClient::logout ($url="")

Variables

 CASClient::$_user
 CASClient::$_cache_times_for_auth_recheck

Function Documentation

CASClient::checkAuthentication (  )  [inherited]

This method is called to check whether the user is authenticated or not.

Returns:
TRUE when the user is authenticated, FALSE otherwise.

Definition at line 667 of file client.php.

References CASClient::isAuthenticated(), CASClient::redirectToCas(), phpCAS::trace(), phpCAS::traceBegin(), and phpCAS::traceEnd().

CASClient::forceAuthentication (  )  [inherited]

This method is called to be sure that the user is authenticated. When not authenticated, halt by redirecting to the CAS server; otherwise return TRUE.

Returns:
TRUE when the user is authenticated; otherwise halt.

Definition at line 623 of file client.php.

References CASClient::isAuthenticated(), CASClient::redirectToCas(), phpCAS::trace(), phpCAS::traceBegin(), and phpCAS::traceEnd().

Referenced by CASClient::getUser().

CASClient::getUser (  )  [inherited]

This method returns the CAS user's login name.

Warning:
should be called only after CASClient::forceAuthentication() or CASClient::isAuthenticated(), otherwise halt with an error.
Returns:
the login name of the authenticated user

Definition at line 609 of file client.php.

References phpCAS::error(), CASClient::forceAuthentication(), and CASClient::isAuthenticated().

Referenced by CASClient::isAuthenticated(), and CASClient::serviceMail().

CASClient::isAuthenticated (  )  [inherited]

This method is called to check if the user is authenticated (previously or by tickets given in the URL).

Returns:
TRUE when the user is authenticated.

Definition at line 724 of file client.php.

References CASClient::getPGT(), CASClient::getPT(), CASClient::getST(), CASClient::getUser(), CASClient::hasPT(), CASClient::hasST(), CASClient::isProxy(), phpCAS::trace(), phpCAS::traceBegin(), phpCAS::traceEnd(), CASClient::validatePGT(), CASClient::validatePT(), CASClient::validateST(), and CASClient::wasPreviouslyAuthenticated().

Referenced by CASClient::checkAuthentication(), CASClient::forceAuthentication(), and CASClient::getUser().

CASClient::isSessionAuthenticated (  )  [inherited]

This method tells if the current session is authenticated.

Returns:
true if authenticated based soley on $_SESSION variable
Since:
0.4.22 by Brendan Arnold

Definition at line 776 of file client.php.

Referenced by CASClient::wasPreviouslyAuthenticated().

CASClient::logout ( url = ""  )  [inherited]

This method is used to logout from CAS.

Parameters:
$url a URL that will be transmitted to the CAS server (to come back to when logged out)

Definition at line 865 of file client.php.

References CASClient::getServerLogoutURL(), CASClient::getString(), CASClient::printHTMLFooter(), CASClient::printHTMLHeader(), phpCAS::traceBegin(), and phpCAS::traceExit().

Referenced by CASClient::getServerLogoutURL().

CASClient::redirectToCas ( gateway = false  )  [inherited]

This method is used to redirect the client to the CAS server. It is used by CASClient::forceAuthentication() and CASClient::checkAuthentication().

Parameters:
$gateway true to check authentication, false to force it

Definition at line 848 of file client.php.

References CASClient::getServerLoginURL(), CASClient::getString(), CASClient::printHTMLFooter(), CASClient::printHTMLHeader(), phpCAS::traceBegin(), and phpCAS::traceExit().

Referenced by CASClient::checkAuthentication(), and CASClient::forceAuthentication().

CASClient::setCacheTimesForAuthRequest ( n  )  [inherited]

Set the number of times authentication will be cached before rechecked.

Parameters:
$n an integer.

Definition at line 657 of file client.php.

CASClient::setUser ( user  )  [private, inherited]

This method sets the CAS user's login name.

Parameters:
$user the login name of the authenticated user.

Definition at line 597 of file client.php.

Referenced by CASClient::validatePT(), CASClient::validateST(), and CASClient::wasPreviouslyAuthenticated().

CASClient::wasPreviouslyAuthenticated (  )  [private, inherited]

This method tells if the user has already been (previously) authenticated by looking into the session variables.

Note:
This function switches to callback mode when needed.
Returns:
TRUE when the user has already been authenticated; FALSE otherwise.

Definition at line 791 of file client.php.

References CASClient::callback(), CASClient::isCallbackMode(), CASClient::isProxy(), CASClient::isSessionAuthenticated(), CASClient::setPGT(), CASClient::setPT(), CASClient::setST(), CASClient::setUser(), phpCAS::trace(), phpCAS::traceBegin(), and phpCAS::traceEnd().

Referenced by CASClient::isAuthenticated().


Variable Documentation

CASClient::$_cache_times_for_auth_recheck [private, inherited]

An integer that gives the number of times authentication will be cached before rechecked.

Definition at line 648 of file client.php.

CASClient::$_user [private, inherited]

The Authenticated user. Written by CASClient::setUser(), read by CASClient::getUser().

Attention:
client applications should use phpCAS::getUser().

Definition at line 588 of file client.php.


Generated on Wed Mar 14 14:55:56 2007 for phpCAS by  doxygen 1.5.0