Functions | Variables

Internal behaviour of phpCAS
[Configuration]

Functions

 CAS_Client::setRequestImplementation ($className)
 CAS_Client::setNoExitOnAuthError ()
 CAS_Client::setNoClearTicketsFromUrl ()
 CAS_Client::setPostAuthenticateCallback ($function, array $additionalArgs=array())
 CAS_Client::setSingleSignoutCallback ($function, array $additionalArgs=array())

Variables

 CAS_Client::$_requestImplementation = 'CAS_CurlRequest'
 CAS_Client::$_exitOnAuthError = true
 CAS_Client::$_clearTicketsFromUrl = true
 CAS_Client::$_postAuthenticateCallbackFunction = null
 CAS_Client::$_postAuthenticateCallbackArgs = array()
 CAS_Client::$_signoutCallbackFunction = null
 CAS_Client::$_signoutCallbackArgs = array()

Function Documentation

CAS_Client::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 602 of file Client.php.

CAS_Client::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 583 of file Client.php.

CAS_Client::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 634 of file Client.php.

CAS_Client::setRequestImplementation ( className  )  [inherited]

Override the default implementation used to make web requests in readUrl(). This class must implement the CAS_RequestInterface.

Parameters:
string $className
Returns:
void

Definition at line 563 of file Client.php.

CAS_Client::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 662 of file Client.php.


Variable Documentation

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

Definition at line 591 of file Client.php.

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

Definition at line 574 of file Client.php.

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

Definition at line 614 of file Client.php.

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

Definition at line 609 of file Client.php.

CAS_Client::$_requestImplementation = 'CAS_CurlRequest' [private, inherited]

The class to instantiate for making web requests in readUrl(). The class specified must implement the CAS_RequestInterface. By default CAS_CurlRequest is used, but this may be overridden to supply alternate request mechanisms for testing.

Definition at line 554 of file Client.php.

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

Definition at line 647 of file Client.php.

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

Definition at line 642 of file Client.php.