phpCAS  version 1.3.6
Functions | Variables
Internal behaviour of phpCAS

Functions

 CAS_Client::setRequestImplementation ($className)
 
 CAS_Client::setNoClearTicketsFromUrl ()
 
 CAS_Client::setCasAttributeParserCallback ($function, array $additionalArgs=array())
 
 CAS_Client::setPostAuthenticateCallback ($function, array $additionalArgs=array())
 
 CAS_Client::setSingleSignoutCallback ($function, array $additionalArgs=array())
 
 CAS_Client::ensureIsProxy ()
 
 CAS_Client::markAuthenticationCall ($auth)
 
 CAS_Client::wasAuthenticationCalled ()
 
 CAS_Client::_ensureAuthenticationCalled ()
 
 CAS_Client::wasAuthenticationCallSuccessful ()
 
 CAS_Client::ensureAuthenticationCallSuccessful ()
 
 CAS_Client::getAuthenticationCallerFile ()
 
 CAS_Client::getAuthenticationCallerLine ()
 
 CAS_Client::getAuthenticationCallerMethod ()
 

Variables

 CAS_Client::$_requestImplementation = 'CAS_Request_CurlRequest'
 
 CAS_Client::$_clearTicketsFromUrl = true
 
 CAS_Client::$_casAttributeParserCallbackFunction = null
 
 CAS_Client::$_casAttributeParserCallbackArgs = array()
 
 CAS_Client::$_postAuthenticateCallbackFunction = null
 
 CAS_Client::$_postAuthenticateCallbackArgs = array()
 
 CAS_Client::$_signoutCallbackFunction = null
 
 CAS_Client::$_signoutCallbackArgs = array()
 
 CAS_Client::$_authentication_caller
 

Detailed Description

Function Documentation

◆ _ensureAuthenticationCalled()

CAS_Client::_ensureAuthenticationCalled ( )
private

◆ ensureAuthenticationCallSuccessful()

CAS_Client::ensureAuthenticationCallSuccessful ( )

◆ ensureIsProxy()

CAS_Client::ensureIsProxy ( )

◆ getAuthenticationCallerFile()

CAS_Client::getAuthenticationCallerFile ( )

Answer information about the authentication caller.

Throws a CAS_OutOfSequenceException if wasAuthenticationCalled() is false and markAuthenticationCall() didn't happen.

Returns
array Keys are 'file', 'line', and 'method'

Definition at line 844 of file Client.php.

References CAS_Client\_ensureAuthenticationCalled().

Referenced by CAS_Client\ensureAuthenticationCallSuccessful().

◆ getAuthenticationCallerLine()

CAS_Client::getAuthenticationCallerLine ( )

Answer information about the authentication caller.

Throws a CAS_OutOfSequenceException if wasAuthenticationCalled() is false and markAuthenticationCall() didn't happen.

Returns
array Keys are 'file', 'line', and 'method'

Definition at line 858 of file Client.php.

References CAS_Client\_ensureAuthenticationCalled().

Referenced by CAS_Client\ensureAuthenticationCallSuccessful().

◆ getAuthenticationCallerMethod()

CAS_Client::getAuthenticationCallerMethod ( )

Answer information about the authentication caller.

Throws a CAS_OutOfSequenceException if wasAuthenticationCalled() is false and markAuthenticationCall() didn't happen.

Returns
array Keys are 'file', 'line', and 'method'

Definition at line 872 of file Client.php.

References CAS_Client\_ensureAuthenticationCalled().

Referenced by CAS_Client\ensureAuthenticationCallSuccessful().

◆ markAuthenticationCall()

CAS_Client::markAuthenticationCall (   $auth)

Mark the caller of authentication. This will help client integraters determine problems with their code flow if they call a function such as getUser() before authentication has occurred.

Parameters
bool$authTrue if authentication was successful, false otherwise.
Returns
null

Definition at line 761 of file Client.php.

References $auth.

Referenced by CAS_Client\isAuthenticated().

◆ setCasAttributeParserCallback()

CAS_Client::setCasAttributeParserCallback (   $function,
array  $additionalArgs = array() 
)

Set a callback function to be run when parsing CAS attributes

The callback function will be passed a XMLNode as its first parameter, followed by any $additionalArgs you pass.

Parameters
string$functioncallback function to call
array$additionalArgsoptional array of arguments
Returns
void

Definition at line 664 of file Client.php.

◆ setNoClearTicketsFromUrl()

CAS_Client::setNoClearTicketsFromUrl ( )

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 638 of file Client.php.

Referenced by CAS_Client\_setProxies().

◆ setPostAuthenticateCallback()

CAS_Client::setPostAuthenticateCallback (   $function,
array  $additionalArgs = array() 
)

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
string$functioncallback function to call
array$additionalArgsoptional array of arguments
Returns
void

Definition at line 698 of file Client.php.

◆ setRequestImplementation()

CAS_Client::setRequestImplementation (   $className)

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

Parameters
string$classNamename of the RequestImplementation class
Returns
void

Definition at line 611 of file Client.php.

◆ setSingleSignoutCallback()

CAS_Client::setSingleSignoutCallback (   $function,
array  $additionalArgs = array() 
)

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
string$functioncallback function to call
array$additionalArgsoptional array of arguments
Returns
void

Definition at line 728 of file Client.php.

◆ wasAuthenticationCalled()

CAS_Client::wasAuthenticationCalled ( )

Answer true if authentication has been checked.

Returns
bool

Definition at line 779 of file Client.php.

Referenced by CAS_Client\_ensureAuthenticationCalled().

◆ wasAuthenticationCallSuccessful()

CAS_Client::wasAuthenticationCallSuccessful ( )

Answer the result of the authentication call.

Throws a CAS_OutOfSequenceException if wasAuthenticationCalled() is false and markAuthenticationCall() didn't happen.

Returns
bool

Definition at line 807 of file Client.php.

References CAS_Client\_ensureAuthenticationCalled().

Variable Documentation

◆ $_authentication_caller

CAS_Client::$_authentication_caller
private

Definition at line 772 of file Client.php.

◆ $_casAttributeParserCallbackArgs

CAS_Client::$_casAttributeParserCallbackArgs = array()
private

Definition at line 651 of file Client.php.

◆ $_casAttributeParserCallbackFunction

CAS_Client::$_casAttributeParserCallbackFunction = null
private

Definition at line 646 of file Client.php.

◆ $_clearTicketsFromUrl

CAS_Client::$_clearTicketsFromUrl = true
private

Definition at line 626 of file Client.php.

◆ $_postAuthenticateCallbackArgs

array CAS_Client::$_postAuthenticateCallbackArgs = array()
private

Definition at line 677 of file Client.php.

◆ $_postAuthenticateCallbackFunction

callback CAS_Client::$_postAuthenticateCallbackFunction = null
private

Definition at line 672 of file Client.php.

◆ $_requestImplementation

CAS_Client::$_requestImplementation = 'CAS_Request_CurlRequest'
private

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

Definition at line 601 of file Client.php.

Referenced by CAS_Client\_readURL(), CAS_Client\_rebroadcast(), and CAS_Client\getProxiedService().

◆ $_signoutCallbackArgs

array CAS_Client::$_signoutCallbackArgs = array()
private

Definition at line 712 of file Client.php.

Referenced by CAS_Client\handleLogoutRequests().

◆ $_signoutCallbackFunction

callback CAS_Client::$_signoutCallbackFunction = null
private

Definition at line 707 of file Client.php.