ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
+ Collaboration diagram for PGT storage:

Functions

 phpCAS::setPGTStorageFile ($format='', $path='')
 This method is used to tell phpCAS to store the response of the CAS server to PGT requests onto the filesystem. More...
 
 phpCAS::setPGTStorageDB ($user, $password, $database_type='', $hostname='', $port=0, $database='', $table='')
 This method is used to tell phpCAS to store the response of the CAS server to PGT requests into a database. More...
 

Variables

const CAS_PGT_STORAGE_FILE_DEFAULT_PATH '/tmp'
 Default path used when storing PGT's to file. More...
 
const CAS_PGT_STORAGE_FILE_FORMAT_PLAIN 'plain'
 phpCAS::setPGTStorageFile()'s 2nd parameter to write plain text files More...
 
const CAS_PGT_STORAGE_FILE_FORMAT_XML 'xml'
 phpCAS::setPGTStorageFile()'s 2nd parameter to write xml files More...
 
const CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT CAS_PGT_STORAGE_FILE_FORMAT_PLAIN
 Default format used when storing PGT's to file. More...
 
const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE 'mysql'
 default database type when storing PGT's to database More...
 
const CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME 'localhost'
 default host when storing PGT's to database More...
 
const CAS_PGT_STORAGE_DB_DEFAULT_PORT ''
 default port when storing PGT's to database More...
 
const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE 'phpCAS'
 default database when storing PGT's to database More...
 
const CAS_PGT_STORAGE_DB_DEFAULT_TABLE 'pgt'
 default table when storing PGT's to database More...
 
const CAS_PGT_STORAGE_FILE_DEFAULT_PATH '/tmp'
 Default path used when storing PGT's to file. More...
 
const CAS_PGT_STORAGE_FILE_FORMAT_PLAIN 'plain'
 phpCAS::setPGTStorageFile()'s 2nd parameter to write plain text files More...
 
const CAS_PGT_STORAGE_FILE_FORMAT_XML 'xml'
 phpCAS::setPGTStorageFile()'s 2nd parameter to write xml files More...
 
const CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT CAS_PGT_STORAGE_FILE_FORMAT_PLAIN
 Default format used when storing PGT's to file. More...
 
const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE 'mysql'
 default database type when storing PGT's to database More...
 
const CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME 'localhost'
 default host when storing PGT's to database More...
 
const CAS_PGT_STORAGE_DB_DEFAULT_PORT ''
 default port when storing PGT's to database More...
 
const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE 'phpCAS'
 default database when storing PGT's to database More...
 
const CAS_PGT_STORAGE_DB_DEFAULT_TABLE 'pgt'
 default table when storing PGT's to database More...
 

Detailed Description

Function Documentation

◆ setPGTStorageDB()

phpCAS::setPGTStorageDB (   $user,
  $password,
  $database_type = '',
  $hostname = '',
  $port = 0,
  $database = '',
  $table = '' 
)

This method is used to tell phpCAS to store the response of the CAS server to PGT requests into a database.

Note
The connection to the database is done only when needed. As a consequence, bad parameters are detected only when initializing PGT storage, except in debug mode.
Parameters
$userthe user to access the data with
$passwordthe user's password
$database_typethe type of the database hosting the data
$hostnamethe server hosting the database
$portthe port the server is listening on
$databasethe name of the database
$tablethe name of the table storing the data

Definition at line 768 of file CAS.php.

References $PHPCAS_AUTH_CHECK_CALL, $PHPCAS_CLIENT, phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

768  {
770 
772  if (!is_object($PHPCAS_CLIENT)) {
773  phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
774  }
775  if (!$PHPCAS_CLIENT->isProxy()) {
776  phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
777  }
778  if ($PHPCAS_AUTH_CHECK_CALL['done']) {
779  phpCAS :: error('this method should only be called before ' . $PHPCAS_AUTH_CHECK_CALL['method'] . '() (called at ' . $PHPCAS_AUTH_CHECK_CALL['file'] . ':' . $PHPCAS_AUTH_CHECK_CALL['line'] . ')');
780  }
781  if (gettype($user) != 'string') {
782  phpCAS :: error('type mismatched for parameter $user (should be `string\')');
783  }
784  if (gettype($password) != 'string') {
785  phpCAS :: error('type mismatched for parameter $password (should be `string\')');
786  }
787  if (gettype($database_type) != 'string') {
788  phpCAS :: error('type mismatched for parameter $database_type (should be `string\')');
789  }
790  if (gettype($hostname) != 'string') {
791  phpCAS :: error('type mismatched for parameter $hostname (should be `string\')');
792  }
793  if (gettype($port) != 'integer') {
794  phpCAS :: error('type mismatched for parameter $port (should be `integer\')');
795  }
796  if (gettype($database) != 'string') {
797  phpCAS :: error('type mismatched for parameter $database (should be `string\')');
798  }
799  if (gettype($table) != 'string') {
800  phpCAS :: error('type mismatched for parameter $table (should be `string\')');
801  }
802  $PHPCAS_CLIENT->setPGTStorageDB($user, $password, $database_type, $hostname, $port, $database, $table);
804  }
traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:604
$PHPCAS_CLIENT
This global variable is used by the interface class phpCAS.
Definition: CAS.php:176
$PHPCAS_AUTH_CHECK_CALL
This global variable is used to store where the method checking the authentication is called from (to...
Definition: CAS.php:195
traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:577
error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:544
+ Here is the call graph for this function:

◆ setPGTStorageFile()

phpCAS::setPGTStorageFile (   $format = '',
  $path = '' 
)

This method is used to tell phpCAS to store the response of the CAS server to PGT requests onto the filesystem.

Parameters
$formatthe format used to store the PGT's (`plain' and `xml' allowed)
$paththe path where the PGT's should be stored

Definition at line 730 of file CAS.php.

References $path, $PHPCAS_AUTH_CHECK_CALL, $PHPCAS_CLIENT, phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

730  {
732 
734  if (!is_object($PHPCAS_CLIENT)) {
735  phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
736  }
737  if (!$PHPCAS_CLIENT->isProxy()) {
738  phpCAS :: error('this method should only be called after ' . __CLASS__ . '::proxy()');
739  }
740  if ($PHPCAS_AUTH_CHECK_CALL['done']) {
741  phpCAS :: error('this method should only be called before ' . $PHPCAS_AUTH_CHECK_CALL['method'] . '() (called at ' . $PHPCAS_AUTH_CHECK_CALL['file'] . ':' . $PHPCAS_AUTH_CHECK_CALL['line'] . ')');
742  }
743  if (gettype($format) != 'string') {
744  phpCAS :: error('type mismatched for parameter $format (should be `string\')');
745  }
746  if (gettype($path) != 'string') {
747  phpCAS :: error('type mismatched for parameter $format (should be `string\')');
748  }
749  $PHPCAS_CLIENT->setPGTStorageFile($format, $path);
751  }
traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:604
$PHPCAS_CLIENT
This global variable is used by the interface class phpCAS.
Definition: CAS.php:176
$PHPCAS_AUTH_CHECK_CALL
This global variable is used to store where the method checking the authentication is called from (to...
Definition: CAS.php:195
traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:577
error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:544
$path
Definition: index.php:22
+ Here is the call graph for this function:

Variable Documentation

◆ CAS_PGT_STORAGE_DB_DEFAULT_DATABASE [1/2]

const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE 'phpCAS'

default database when storing PGT's to database

Definition at line 98 of file CAS.php.

◆ CAS_PGT_STORAGE_DB_DEFAULT_DATABASE [2/2]

const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE 'phpCAS'

default database when storing PGT's to database

Definition at line 180 of file CAS.php.

Referenced by PGTStorageDB\PGTStorageDB().

◆ CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE [1/2]

const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE 'mysql'

default database type when storing PGT's to database

Definition at line 86 of file CAS.php.

◆ CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE [2/2]

const CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE 'mysql'

default database type when storing PGT's to database

Definition at line 168 of file CAS.php.

Referenced by PGTStorageDB\PGTStorageDB().

◆ CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME [1/2]

const CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME 'localhost'

default host when storing PGT's to database

Definition at line 90 of file CAS.php.

◆ CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME [2/2]

const CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME 'localhost'

default host when storing PGT's to database

Definition at line 172 of file CAS.php.

Referenced by PGTStorageDB\PGTStorageDB().

◆ CAS_PGT_STORAGE_DB_DEFAULT_PORT [1/2]

const CAS_PGT_STORAGE_DB_DEFAULT_PORT ''

default port when storing PGT's to database

Definition at line 94 of file CAS.php.

◆ CAS_PGT_STORAGE_DB_DEFAULT_PORT [2/2]

const CAS_PGT_STORAGE_DB_DEFAULT_PORT ''

default port when storing PGT's to database

Definition at line 176 of file CAS.php.

Referenced by PGTStorageDB\PGTStorageDB().

◆ CAS_PGT_STORAGE_DB_DEFAULT_TABLE [1/2]

const CAS_PGT_STORAGE_DB_DEFAULT_TABLE 'pgt'

default table when storing PGT's to database

Definition at line 102 of file CAS.php.

◆ CAS_PGT_STORAGE_DB_DEFAULT_TABLE [2/2]

const CAS_PGT_STORAGE_DB_DEFAULT_TABLE 'pgt'

default table when storing PGT's to database

Definition at line 184 of file CAS.php.

Referenced by PGTStorageDB\PGTStorageDB().

◆ CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT [1/2]

const CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT CAS_PGT_STORAGE_FILE_FORMAT_PLAIN

Default format used when storing PGT's to file.

Definition at line 79 of file CAS.php.

◆ CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT [2/2]

const CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT CAS_PGT_STORAGE_FILE_FORMAT_PLAIN

Default format used when storing PGT's to file.

Definition at line 161 of file CAS.php.

Referenced by PGTStorageFile\PGTStorageFile().

◆ CAS_PGT_STORAGE_FILE_DEFAULT_PATH [1/2]

const CAS_PGT_STORAGE_FILE_DEFAULT_PATH '/tmp'

Default path used when storing PGT's to file.

Definition at line 67 of file CAS.php.

◆ CAS_PGT_STORAGE_FILE_DEFAULT_PATH [2/2]

const CAS_PGT_STORAGE_FILE_DEFAULT_PATH '/tmp'

Default path used when storing PGT's to file.

Definition at line 149 of file CAS.php.

Referenced by PGTStorageFile\PGTStorageFile().

◆ CAS_PGT_STORAGE_FILE_FORMAT_PLAIN [1/2]

const CAS_PGT_STORAGE_FILE_FORMAT_PLAIN 'plain'

phpCAS::setPGTStorageFile()'s 2nd parameter to write plain text files

Definition at line 71 of file CAS.php.

◆ CAS_PGT_STORAGE_FILE_FORMAT_PLAIN [2/2]

const CAS_PGT_STORAGE_FILE_FORMAT_PLAIN 'plain'

phpCAS::setPGTStorageFile()'s 2nd parameter to write plain text files

Definition at line 153 of file CAS.php.

Referenced by PGTStorageFile\PGTStorageFile().

◆ CAS_PGT_STORAGE_FILE_FORMAT_XML [1/2]

const CAS_PGT_STORAGE_FILE_FORMAT_XML 'xml'

phpCAS::setPGTStorageFile()'s 2nd parameter to write xml files

Definition at line 75 of file CAS.php.

◆ CAS_PGT_STORAGE_FILE_FORMAT_XML [2/2]

const CAS_PGT_STORAGE_FILE_FORMAT_XML 'xml'

phpCAS::setPGTStorageFile()'s 2nd parameter to write xml files

Definition at line 157 of file CAS.php.

Referenced by PGTStorageFile\PGTStorageFile().