‪TYPO3CMS  11.5
TYPO3\CMS\Core\Authentication\AbstractAuthenticationService Class Reference
Inheritance diagram for TYPO3\CMS\Core\Authentication\AbstractAuthenticationService:
TYPO3\CMS\Core\Authentication\AuthenticationService

Public Member Functions

 initAuth ($mode, $loginData, $authInfo, $pObj)
 
 writelog ($type, $action, $error, $details_nr, $details, $data, $tablename='', $recuid='', $recpid='')
 
 init ()
 
 reset ()
 
string getServiceKey ()
 
string getServiceTitle ()
 
mixed getServiceOption ($optionName, $defaultValue='', $includeDefaultConfig=true)
 
array getLastErrorArray ()
 

Public Attributes

AbstractUserAuthentication $pObj
 
string $mode
 
array $login = array( )
 
array $authInfo = array( )
 
array $db_user = array( )
 
bool $writeAttemptLog = false
 
array $info = array( )
 
array< string, function fetchUserRecord( $username, $extraWhere='', $dbUserSetup='') { $dbUser=is_array( $dbUserSetup) ? $dbUserSetup :$this-> db_user
 
 $user = false
 
if($username|| $extraWhere) return $user
 

Detailed Description

Authentication services class

Definition at line 29 of file AbstractAuthenticationService.php.

Member Function Documentation

◆ getLastErrorArray()

array TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::getLastErrorArray ( )
Returns
‪array

this is part of the Service API which should be avoided to be used and only used within TYPO3 internally

Definition at line 223 of file AbstractAuthenticationService.php.

◆ getServiceKey()

string TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::getServiceKey ( )

Returns the service key of the service

Returns
‪string Service key

this is part of the Service API which should be avoided to be used and only used within TYPO3 internally

Definition at line 177 of file AbstractAuthenticationService.php.

◆ getServiceOption()

mixed TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::getServiceOption (   $optionName,
  $defaultValue = '',
  $includeDefaultConfig = true 
)

Returns service configuration values from the $TYPO3_CONF_VARS['SVCONF'] array

Parameters
string$optionName‪Name of the config option
mixed$defaultValue‪Default configuration if no special config is available
bool$includeDefaultConfig‪If set the 'default' config will be returned if no special config for this service is available (default: TRUE)
Returns
‪mixed Configuration value for the service

this is part of the Service API which should be avoided to be used and only used within TYPO3 internally

Definition at line 202 of file AbstractAuthenticationService.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Authentication\AbstractAuthenticationService\initAuth().

◆ getServiceTitle()

string TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::getServiceTitle ( )

Returns the title of the service

Returns
‪string Service title

this is part of the Service API which should be avoided to be used and only used within TYPO3 internally

Definition at line 188 of file AbstractAuthenticationService.php.

◆ init()

TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::init ( )

Initialization of the service. This is a stub as needed by GeneralUtility::makeInstanceService()

this is part of the Service API which should be avoided to be used and only used within TYPO3 internally

Definition at line 156 of file AbstractAuthenticationService.php.

◆ initAuth()

TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::initAuth (   $mode,
  $loginData,
  $authInfo,
  $pObj 
)

Initialize authentication service

Parameters
string$mode‪Subtype of the service which is used to call the service.
array$loginData‪Submitted login form data
array$authInfoInformation array. Holds submitted form data etc.
AbstractUserAuthentication$pObj‪Parent object

Definition at line 81 of file AbstractAuthenticationService.php.

References TYPO3\CMS\Core\Authentication\AbstractAuthenticationService\$authInfo, TYPO3\CMS\Core\Authentication\AbstractAuthenticationService\$mode, TYPO3\CMS\Core\Authentication\AbstractAuthenticationService\$pObj, TYPO3\CMS\Core\Authentication\AbstractAuthenticationService\db_user, and TYPO3\CMS\Core\Authentication\AbstractAuthenticationService\getServiceOption().

◆ reset()

TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::reset ( )

Resets the service. This is a stub as needed by GeneralUtility::makeInstanceService()

this is part of the Service API which should be avoided to be used and only used within TYPO3 internally

Definition at line 166 of file AbstractAuthenticationService.php.

◆ writelog()

TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::writelog (   $type,
  $action,
  $error,
  $details_nr,
  $details,
  $data,
  $tablename = '',
  $recuid = '',
  $recpid = '' 
)

Writes to log database table in pObj

Parameters
int$type‪denotes which module that has submitted the entry. This is the current list: 1=tce_db; 2=tce_file; 3=system (eg. sys_history save); 4=modules; 254=Personal settings changed; 255=login / out action: 1=login, 2=logout, 3=failed login (+ errorcode 3), 4=failure_warning_email sent
int$action‪denotes which specific operation that wrote the entry (eg. 'delete', 'upload', 'update' and so on...). Specific for each $type. Also used to trigger update of the interface. (see the log-module for the meaning of each number !!)
int$error‪flag. 0 = message, 1 = error (user problem), 2 = System Error (which should not happen), 3 = security notice (admin)
int$details_nr‪The message number. Specific for each $type and $action. in the future this will make it possible to translate error messages to other languages
string$details‪Default text that follows the message
array$data‪Data that follows the log. Might be used to carry special information. If an array the first 5 entries (0-4) will be sprintf'ed the details-text...
string$tablename‪Special field used by tce_main.php. These ($tablename, $recuid, $recpid) holds the reference to the record which the log-entry is about. (Was used in attic status.php to update the interface.)
int | string$recuid‪Special field used by tce_main.php. These ($tablename, $recuid, $recpid) holds the reference to the record which the log-entry is about. (Was used in attic status.php to update the interface.)
int | string$recpid‪Special field used by tce_main.php. These ($tablename, $recuid, $recpid) holds the reference to the record which the log-entry is about. (Was used in attic status.php to update the interface.)

Definition at line 105 of file AbstractAuthenticationService.php.

Member Data Documentation

◆ $authInfo

array TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::$authInfo = array( )

◆ $db_user

array TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::$db_user = array( )

User db table definition

Definition at line 61 of file AbstractAuthenticationService.php.

◆ $info

array TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::$info = array( )

service description array

Definition at line 71 of file AbstractAuthenticationService.php.

◆ $login

array TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::$login = array( )

Submitted login form data

Definition at line 49 of file AbstractAuthenticationService.php.

◆ $mode

string TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::$mode

Subtype of the service which is used to call the service.

Definition at line 43 of file AbstractAuthenticationService.php.

Referenced by TYPO3\CMS\Core\Authentication\AbstractAuthenticationService\initAuth().

◆ $pObj

AbstractUserAuthentication TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::$pObj

◆ $user [1/2]

TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::$user = false

Definition at line 123 of file AbstractAuthenticationService.php.

◆ $user [2/2]

if ( $username||$extraWhere) return TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::$user

Definition at line 148 of file AbstractAuthenticationService.php.

◆ $writeAttemptLog

bool TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::$writeAttemptLog = false

If the writelog() functions is called if a login-attempt has be tried without success

Definition at line 67 of file AbstractAuthenticationService.php.

◆ db_user

array<string, function fetchUserRecord($username, $extraWhere = '', $dbUserSetup = '') { $dbUser = is_array($dbUserSetup) ? $dbUserSetup : $this-> TYPO3\CMS\Core\Authentication\AbstractAuthenticationService::db_user

Get a user from DB by username

Parameters
string$username‪User name
string$extraWhere‪Additional WHERE clause: " AND ...
array | string$dbUserSetup‪User db table definition, or empty string for $this->db_user
Returns
‪array<string, mixed>|false User array or FALSE

Definition at line 122 of file AbstractAuthenticationService.php.

Referenced by TYPO3\CMS\Core\Authentication\AuthenticationService\authUser(), and TYPO3\CMS\Core\Authentication\AbstractAuthenticationService\initAuth().