Functions | Variables

HTML output
[Configuration]

Functions

 CASClient::HTMLFilterOutput ($str)
 CASClient::printHTMLHeader ($title)
 CASClient::printHTMLFooter ()
 CASClient::setHTMLHeader ($header)
 CASClient::setHTMLFooter ($footer)
 CASClient::setNoExitOnAuthError ()
 CASClient::setNoClearTicketsFromUrl ()
 CASClient::setPostAuthenticateCallback ($function, array $additionalArgs=array())
 CASClient::setSingleSignoutCallback ($function, array $additionalArgs=array())

Variables

 CASClient::$_output_header
 CASClient::$_output_footer
 CASClient::$_exitOnAuthError = true
 CASClient::$_clearTicketsFromUrl = true
 CASClient::$_postAuthenticateCallbackFunction = null
 CASClient::$_postAuthenticateCallbackArgs = array()
 CASClient::$_signoutCallbackFunction = null
 CASClient::$_signoutCallbackArgs = array()

Function Documentation

CASClient::HTMLFilterOutput ( str  )  [private, inherited]

This method filters a string by replacing special tokens by appropriate values and prints it. The corresponding tokens are taken into account:

  • __CAS_VERSION__
  • __PHPCAS_VERSION__
  • __SERVER_BASE_URL__

Used by CASClient::PrintHTMLHeader() and CASClient::printHTMLFooter().

Parameters:
$str the string to filter and output

Definition at line 85 of file client.php.

References CASClient::getServerBaseURL(), CASClient::getServerVersion(), and phpCAS::getVersion().

Referenced by CASClient::printHTMLFooter(), and CASClient::printHTMLHeader().

CASClient::printHTMLFooter (  )  [private, inherited]

This method prints the footer of the HTML output (after filtering). If CASClient::setHTMLFooter() was not used, a default footer is output.

See also:
HTMLFilterOutput()

Definition at line 136 of file client.php.

References CASClient::getString(), and CASClient::HTMLFilterOutput().

Referenced by CASClient::logout(), and CASClient::redirectToCas().

CASClient::printHTMLHeader ( title  )  [private, inherited]

This method prints the header of the HTML output (after filtering). If CASClient::setHTMLHeader() was not used, a default header is output.

Parameters:
$title the title of the page
See also:
HTMLFilterOutput()

Definition at line 110 of file client.php.

References CASClient::HTMLFilterOutput().

Referenced by CASClient::logout(), and CASClient::redirectToCas().

CASClient::setHTMLFooter ( footer  )  [inherited]

This method set the HTML footer used for all outputs.

Parameters:
$footer the HTML footer.

Definition at line 158 of file client.php.

CASClient::setHTMLHeader ( header  )  [inherited]

This method set the HTML header used for all outputs.

Parameters:
$header the HTML header.

Definition at line 148 of file client.php.

CASClient::setNoClearTicketsFromUrl (  )  [inherited]

Configure the client to not send redirect headers and call exit() on authentication success. The normal redirect is used to remove the service ticket from the client's URL, but for running unit tests we need to continue without exiting.

Needed for testing authentication

Returns:
void

Definition at line 194 of file client.php.

CASClient::setNoExitOnAuthError (  )  [inherited]

Configure the client to not call exit() when an authentication failure occurs.

Needed for testing proper failure handling.

Returns:
void

Definition at line 175 of file client.php.

CASClient::setPostAuthenticateCallback ( function,
array $  additionalArgs = array() 
) [inherited]

Set a callback function to be run when a user authenticates.

The callback function will be passed a $logoutTicket as its first parameter, followed by any $additionalArgs you pass. The $logoutTicket parameter is an opaque string that can be used to map a session-id to the logout request in order to support single-signout in applications that manage their own sessions (rather than letting phpCAS start the session).

phpCAS::forceAuthentication() will always exit and forward client unless they are already authenticated. To perform an action at the moment the user logs in (such as registering an account, performing logging, etc), register a callback function here.

Parameters:
callback $function
optional array $additionalArgs
Returns:
void

Definition at line 226 of file client.php.

CASClient::setSingleSignoutCallback ( function,
array $  additionalArgs = array() 
) [inherited]

Set a callback function to be run when a single-signout request is received.

The callback function will be passed a $logoutTicket as its first parameter, followed by any $additionalArgs you pass. The $logoutTicket parameter is an opaque string that can be used to map a session-id to the logout request in order to support single-signout in applications that manage their own sessions (rather than letting phpCAS start and destroy the session).

Parameters:
callback $function
optional array $additionalArgs
Returns:
void

Definition at line 254 of file client.php.


Variable Documentation

CASClient::$_clearTicketsFromUrl = true [private, inherited]

Definition at line 183 of file client.php.

CASClient::$_exitOnAuthError = true [private, inherited]

Definition at line 166 of file client.php.

CASClient::$_output_footer [private, inherited]

A string used to print the footer of HTML pages. Written by CASClient::setHTMLFooter(), read by printHTMLFooter().

See also:
CASClient::setHTMLFooter, CASClient::printHTMLFooter()

Definition at line 128 of file client.php.

CASClient::$_output_header [private, inherited]

A string used to print the header of HTML pages. Written by CASClient::setHTMLHeader(), read by CASClient::printHTMLHeader().

See also:
CASClient::setHTMLHeader, CASClient::printHTMLHeader()

Definition at line 100 of file client.php.

array CASClient::$_postAuthenticateCallbackArgs = array() [private, inherited]

Definition at line 206 of file client.php.

callback CASClient::$_postAuthenticateCallbackFunction = null [private, inherited]

Definition at line 201 of file client.php.

array CASClient::$_signoutCallbackArgs = array() [private, inherited]

Definition at line 239 of file client.php.

callback CASClient::$_signoutCallbackFunction = null [private, inherited]

Definition at line 234 of file client.php.