| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 1284 lines (40 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
phpCAS:: (34 methods):
client()
proxy()
setDebug()
backtrace()
log()
error()
trace()
traceBegin()
traceEnd()
traceExit()
setLang()
getVersion()
setHTMLHeader()
setHTMLFooter()
setPGTStorageFile()
setPGTStorageDB()
serviceWeb()
serviceMail()
setCacheTimesForAuthRecheck()
checkAuthentication()
forceAuthentication()
authenticate()
isAuthenticated()
isSessionAuthenticated()
getUser()
getServerLoginURL()
setServerLoginURL()
getServerLogoutURL()
setServerLogoutURL()
logout()
setFixedCallbackURL()
setFixedServiceURL()
getServiceURL()
retrievePT()
| client($server_version,$server_hostname,$server_port,$server_uri,$start_session = true) X-Ref |
| phpCAS client initializer. param: $server_version the version of the CAS server param: $server_hostname the hostname of the CAS server param: $server_port the port the CAS server is running on param: $server_uri the URI the CAS server is responding on param: $start_session Have phpCAS start PHP sessions (default true) return: a newly created CASClient object |
| proxy($server_version,$server_hostname,$server_port,$server_uri,$start_session = true) X-Ref |
| phpCAS proxy initializer. param: $server_version the version of the CAS server param: $server_hostname the hostname of the CAS server param: $server_port the port the CAS server is running on param: $server_uri the URI the CAS server is responding on param: $start_session Have phpCAS start PHP sessions (default true) return: a newly created CASClient object |
| setDebug($filename='') X-Ref |
| Set/unset debug mode param: $filename the name of the file used for logging, or FALSE to stop debugging. |
| backtrace() X-Ref |
| This method is a wrapper for debug_backtrace() that is not available in all PHP versions (>= 4.3.0 only) |
| log($str) X-Ref |
| Logs a string in debug mode. param: $str the string to write |
| error($msg) X-Ref |
| This method is used by interface methods to print an error and where the function was originally called from. param: $msg the message to print |
| trace($str) X-Ref |
| This method is used to log something in debug mode. |
| traceBegin() X-Ref |
| This method is used to indicate the start of the execution of a function in debug mode. |
| traceEnd($res='') X-Ref |
| This method is used to indicate the end of the execution of a function in debug mode. param: $res the result of the function |
| traceExit() X-Ref |
| This method is used to indicate the end of the execution of the program |
| setLang($lang) X-Ref |
| This method is used to set the language used by phpCAS. param: $lang a string representing the language. |
| getVersion() X-Ref |
| This method returns the phpCAS version. return: the phpCAS version. |
| setHTMLHeader($header) X-Ref |
| This method sets the HTML header used for all outputs. param: $header the HTML header. |
| setHTMLFooter($footer) X-Ref |
| This method sets the HTML footer used for all outputs. param: $footer the HTML footer. |
| setPGTStorageFile($format='',$path='') X-Ref |
| This method is used to tell phpCAS to store the response of the CAS server to PGT requests onto the filesystem. param: $format the format used to store the PGT's (`plain' and `xml' allowed) param: $path the path where the PGT's should be stored |
| setPGTStorageDB($user,$password,$database_type='',$hostname='',$port=0,$database='',$table='') X-Ref |
| This method is used to tell phpCAS to store the response of the CAS server to PGT requests into a database. param: $user the user to access the data with param: $password the user's password param: $database_type the type of the database hosting the data param: $hostname the server hosting the database param: $port the port the server is listening on param: $database the name of the database param: $table the name of the table storing the data |
| serviceWeb($url,&$err_code,&$output) X-Ref |
| This method is used to access an HTTP[S] service. param: $url the service to access. param: $err_code an error code Possible values are PHPCAS_SERVICE_OK (on param: $output the output of the service (also used to give an error return: TRUE on success, FALSE otherwise (in this later case, $err_code |
| serviceMail($url,$flags,&$err_code,&$err_msg,&$pt) X-Ref |
| This method is used to access an IMAP/POP3/NNTP service. param: $url a string giving the URL of the service, including the mailing box param: $flags options given to imap_open(). param: $err_code an error code Possible values are PHPCAS_SERVICE_OK (on param: $err_msg an error message on failure param: $pt the Proxy Ticket (PT) retrieved from the CAS server to access the URL return: an IMAP stream on success, FALSE otherwise (in this later case, $err_code |
| setCacheTimesForAuthRecheck($n) X-Ref |
| Set the times authentication will be cached before really accessing the CAS server in gateway mode: - -1: check only once, and then never again (until you pree login) - 0: always check - n: check every "n" time param: $n an integer. |
| checkAuthentication() X-Ref |
| This method is called to check if the user is authenticated (use the gateway feature). return: TRUE when the user is authenticated; otherwise FALSE. |
| forceAuthentication() X-Ref |
| This method is called to force authentication if the user was not already authenticated. If the user is not authenticated, halt by redirecting to the CAS server. |
| authenticate() X-Ref |
| This method has been left from version 0.4.1 for compatibility reasons. |
| isAuthenticated() X-Ref |
| This method is called to check if the user is authenticated (previously or by tickets given in the URL). return: TRUE when the user is authenticated. |
| isSessionAuthenticated() X-Ref |
| Checks whether authenticated based on $_SESSION. Useful to avoid server calls. return: true if authenticated, false otherwise. |
| getUser() X-Ref |
| This method returns the CAS user's login name. return: the login name of the authenticated user |
| getServerLoginURL() X-Ref |
| This method returns the URL to be used to login. or phpCAS::isAuthenticated(). return: the login name of the authenticated user |
| setServerLoginURL($url='') X-Ref |
| Set the login URL of the CAS server. param: $url the login URL |
| getServerLogoutURL() X-Ref |
| This method returns the URL to be used to login. or phpCAS::isAuthenticated(). return: the login name of the authenticated user |
| setServerLogoutURL($url='') X-Ref |
| Set the logout URL of the CAS server. param: $url the logout URL |
| logout($url = "") X-Ref |
| This method is used to logout from CAS. Halts by redirecting to the CAS server. param: $url a URL that will be transmitted to the CAS server (to come back to when logged out) |
| setFixedCallbackURL($url='') X-Ref |
| Set the fixed URL that will be used by the CAS server to transmit the PGT. When this method is not called, a phpCAS script uses its own URL for the callback. param: $url the URL |
| setFixedServiceURL($url) X-Ref |
| Set the fixed URL that will be set as the CAS service parameter. When this method is not called, a phpCAS script uses its own URL. param: $url the URL |
| getServiceURL() X-Ref |
| Get the URL that is set as the CAS service parameter. |
| retrievePT($target_service,&$err_code,&$err_msg) X-Ref |
| Retrieve a Proxy Ticket from the CAS server. |
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |