Authentication
[Implementation]

Functions

 CASClient::setUser ($user)
 CASClient::getUser ()
 CASClient::setAttributes ($attributes)
 CASClient::getAttributes ()
 CASClient::hasAttributes ()
 CASClient::hasAttribute ($key)
 CASClient::getAttribute ($key)
 CASClient::renewAuthentication ()
 CASClient::forceAuthentication ()
 CASClient::setCacheTimesForAuthRecheck ($n)
 CASClient::checkAuthentication ()
 CASClient::isAuthenticated ()
 CASClient::isSessionAuthenticated ()
 CASClient::wasPreviouslyAuthenticated ()
 CASClient::redirectToCas ($gateway=false, $renew=false)
 CASClient::logout ($params)
 CASClient::isLogoutRequest ()
 CASClient::isLogoutRequestAllowed ()
 CASClient::handleLogoutRequests ($check_client=true, $allowed_clients=false)

Variables

 CASClient::$_user
 CASClient::$_attributes
 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 858 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 812 of file client.php.

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

CASClient::getAttribute ( key  )  [inherited]

Definition at line 780 of file client.php.

References CASClient::hasAttribute().

CASClient::getAttributes (  )  [inherited]

Definition at line 767 of file client.php.

References phpCAS::error().

Referenced by CASClient::isAuthenticated().

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 739 of file client.php.

References phpCAS::error().

Referenced by CASClient::isAuthenticated().

CASClient::handleLogoutRequests ( check_client = true,
allowed_clients = false 
) [inherited]

This method handles logout requests.

Parameters:
$check_client true to check the client bofore handling the request, false not to perform any access control. True by default.
$allowed_clients an array of host names allowed to send logout requests. By default, only the CAs server (declared in the constructor) will be allowed.

Definition at line 1152 of file client.php.

References phpCAS::error(), CASClient::getServerHostname(), CASClient::isLogoutRequest(), phpCAS::log(), phpCAS::traceBegin(), phpCAS::traceEnd(), and phpCAS::traceExit().

CASClient::hasAttribute ( key  )  [inherited]

Definition at line 777 of file client.php.

Referenced by CASClient::getAttribute().

CASClient::hasAttributes (  )  [inherited]

Definition at line 774 of file client.php.

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. Also may redirect to the same URL without the ticket.

Definition at line 915 of file client.php.

References CASClient::getAttributes(), CASClient::getPGT(), CASClient::getPT(), CASClient::getSA(), CASClient::getST(), CASClient::getURL(), CASClient::getUser(), CASClient::hasSA(), CASClient::hasST(), CASClient::isProxy(), phpCAS::log(), phpCAS::trace(), phpCAS::traceBegin(), phpCAS::traceEnd(), CASClient::validatePGT(), CASClient::validatePT(), and CASClient::wasPreviouslyAuthenticated().

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

CASClient::isLogoutRequest (  )  [private, inherited]
Returns:
true if the current request is a logout request.

Definition at line 1133 of file client.php.

Referenced by CASClient::CASClient(), and CASClient::handleLogoutRequests().

CASClient::isLogoutRequestAllowed (  )  [private, inherited]
Returns:
true if a logout request is allowed.

Definition at line 1141 of file client.php.

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 984 of file client.php.

Referenced by CASClient::wasPreviouslyAuthenticated().

CASClient::logout ( params  )  [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) This method is used to logout from CAS. $params an array that contains the optional url and service parameters that will be passed to the CAS server

Definition at line 1104 of file client.php.

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

CASClient::redirectToCas ( gateway = false,
renew = 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
$renew true to force the authentication with the CAS server

Definition at line 1060 of file client.php.

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

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

CASClient::renewAuthentication (  )  [inherited]

This method is called to renew the authentication of the user If the user is authenticated, renew the connection If not, redirect to CAS

Definition at line 792 of file client.php.

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

CASClient::setAttributes ( attributes  )  [inherited]

Definition at line 764 of file client.php.

Referenced by CASClient::wasPreviouslyAuthenticated().

CASClient::setCacheTimesForAuthRecheck ( n  )  [inherited]

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

Parameters:
$n an integer.

Definition at line 848 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 727 of file client.php.

Referenced by 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 999 of file client.php.

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

Referenced by CASClient::isAuthenticated().


Variable Documentation

CASClient::$_attributes [private, inherited]

The Authenticated users attributes. Written by CASClient::setAttributes(), read by CASClient::getAttributes().

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

Definition at line 762 of file client.php.

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 839 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 718 of file client.php.

Generated by  doxygen 1.6.2-20100208