‪TYPO3CMS  ‪main
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)
 
 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 28 of file AbstractAuthenticationService.php.

Member Function Documentation

◆ getLastErrorArray()

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

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

Definition at line 220 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 175 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 200 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 186 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 154 of file AbstractAuthenticationService.php.

◆ initAuth()

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

◆ 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 164 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 104 of file AbstractAuthenticationService.php.

References TYPO3\CMS\Webhooks\Message\$details.

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 60 of file AbstractAuthenticationService.php.

◆ $info

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

service description array

Definition at line 70 of file AbstractAuthenticationService.php.

◆ $login

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

Submitted login form data

Definition at line 48 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 42 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 122 of file AbstractAuthenticationService.php.

◆ $user [2/2]

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

Definition at line 146 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 66 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 121 of file AbstractAuthenticationService.php.

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