‪TYPO3CMS  9.5
TYPO3\CMS\Core\Authentication\AuthenticationService Class Reference
Inheritance diagram for TYPO3\CMS\Core\Authentication\AuthenticationService:
TYPO3\CMS\Core\Authentication\AbstractAuthenticationService TYPO3\CMS\Core\Service\AbstractService TYPO3\CMS\Rsaauth\RsaAuthService TYPO3\CMS\Sv\AuthenticationService

Public Member Functions

bool processLoginData (array &$loginData, $passwordTransmissionStrategy)
 
mixed getUser ()
 
int authUser (array $user)
 
mixed getGroups ($user, $knownGroups)
 
 getSubGroups ($grList, $idList, &$groups)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Authentication\AbstractAuthenticationService
 initAuth ($mode, $loginData, $authInfo, $pObj)
 
bool compareUident (array $user, array $loginData, $passwordCompareStrategy='')
 
 writelog ($type, $action, $error, $details_nr, $details, $data, $tablename='', $recuid='', $recpid='')
 
mixed fetchUserRecord ($username, $extraWhere='', $dbUserSetup='')
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Service\AbstractService
array getServiceInfo ()
 
string getServiceKey ()
 
string getServiceTitle ()
 
mixed getServiceOption ($optionName, $defaultValue='', $includeDefaultConfig=true)
 
 devLog ($msg, $severity=0, $dataVar=false)
 
 errorPush ($errNum=self::ERROR_GENERAL, $errMsg='Unspecified error occurred')
 
 errorPull ()
 
int bool getLastError ()
 
string getLastErrorMsg ()
 
array getErrorMsgArray ()
 
array getLastErrorArray ()
 
 resetErrors ()
 
bool checkExec ($progList)
 
 deactivateService ()
 
string bool checkInputFile ($absFile)
 
string bool readFile ($absFile, $length=0)
 
string bool writeFile ($content, $absFile='')
 
string bool tempFile ($filePrefix)
 
 registerTempFile ($absFile)
 
 unlinkTempFiles ()
 
 setInput ($content, $type='')
 
 setInputFile ($absFile, $type='')
 
mixed getInput ()
 
string getInputFile ($createFile='')
 
 setOutputFile ($absFile)
 
mixed getOutput ()
 
mixed getOutputFile ($absFile='')
 
bool init ()
 
 reset ()
 
 __destruct ()
 

Protected Member Functions

 updatePasswordHashInDatabase (string $table, int $uid, string $newPassword)
 
 writeLogMessage (string $message,... $params)
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Authentication\AbstractAuthenticationService
AbstractUserAuthentication $pObj
 
string $mode
 
array $login = array( )
 
array $authInfo = array( )
 
array $db_user = array( )
 
array $db_groups = array( )
 
bool $writeAttemptLog = false
 
- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Service\AbstractService
const ERROR_GENERAL = -1
 
const ERROR_SERVICE_NOT_AVAILABLE = -2
 
const ERROR_WRONG_SUBTYPE = -3
 
const ERROR_NO_INPUT = -4
 
const ERROR_FILE_NOT_FOUND = -20
 
const ERROR_FILE_NOT_READABLE = -21
 
const ERROR_FILE_NOT_WRITEABLE = -22
 
const ERROR_PROGRAM_NOT_FOUND = -40
 
const ERROR_PROGRAM_FAILED = -41
 
array $info = array( )
 
array $error = array( )
 
string $out = ''
 
string $inputFile = ''
 
string $inputContent = ''
 
string $inputType = ''
 
string $outputFile = ''
 
array $tempFiles = array( )
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Service\AbstractService
array $shutdownRegistry = array( )
 
string $prefixId = ''
 

Detailed Description

Authentication services class

Definition at line 29 of file AuthenticationService.php.

Member Function Documentation

◆ authUser()

int TYPO3\CMS\Core\Authentication\AuthenticationService::authUser ( array  $user)

Authenticate a user: Check submitted user credentials against stored hashed password, check domain lock if configured.

Returns one of the following status codes: >= 200: User authenticated successfully. No more checking is needed by other auth services. >= 100: User not authenticated; this service is not responsible. Other auth services will be asked.

0: User authenticated successfully. Other auth services will still be asked.

<= 0: Authentication failed, no more checking needed by other auth services.

Parameters
array$user‪User data
Returns
‪int Authentication status code, one of 0, 100, 200

Definition at line 97 of file AuthenticationService.php.

◆ getGroups()

mixed TYPO3\CMS\Core\Authentication\AuthenticationService::getGroups (   $user,
  $knownGroups 
)

Find usergroup records, currently only for frontend

Parameters
array$user‪Data of user.
array$knownGroups‪Group data array of already known groups. This is handy if you want select other related groups. Keys in this array are unique IDs of those groups.
Returns
‪mixed Groups array, keys = uid which must be unique

Definition at line 238 of file AuthenticationService.php.

References $GLOBALS, and TYPO3\CMS\Core\Authentication\AuthenticationService\getSubGroups().

◆ getSubGroups()

TYPO3\CMS\Core\Authentication\AuthenticationService::getSubGroups (   $grList,
  $idList,
$groups 
)

Fetches subgroups of groups. Function is called recursively for each subgroup. Function was previously copied from \TYPO3\CMS\Core\Authentication\BackendUserAuthentication->fetchGroups and has been slightly modified.

Parameters
string$grList‪Commalist of fe_groups uid numbers
string$idList‪List of already processed fe_groups-uids so the function will not fall into an eternal recursion.
array$groups

Definition at line 307 of file AuthenticationService.php.

Referenced by TYPO3\CMS\Core\Authentication\AuthenticationService\getGroups().

◆ getUser()

mixed TYPO3\CMS\Core\Authentication\AuthenticationService::getUser ( )

Find a user (eg. look up the user record in database when a login is sent)

Returns
‪mixed User array or FALSE

Definition at line 54 of file AuthenticationService.php.

References TYPO3\CMS\Core\Authentication\AbstractAuthenticationService\fetchUserRecord(), TYPO3\CMS\Core\Authentication\LoginType\LOGIN, and TYPO3\CMS\Core\Authentication\AbstractAuthenticationService\writelog().

◆ processLoginData()

bool TYPO3\CMS\Core\Authentication\AuthenticationService::processLoginData ( array &  $loginData,
  $passwordTransmissionStrategy 
)

Process the submitted credentials. In this case hash the clear text password if it has been submitted.

Parameters
array$loginData‪Credentials that are submitted and potentially modified by other services
string$passwordTransmissionStrategy‪Keyword of how the password has been hashed or encrypted before submission
Returns
‪bool

Reimplemented in TYPO3\CMS\Rsaauth\RsaAuthService.

Definition at line 39 of file AuthenticationService.php.

◆ updatePasswordHashInDatabase()

TYPO3\CMS\Core\Authentication\AuthenticationService::updatePasswordHashInDatabase ( string  $table,
int  $uid,
string  $newPassword 
)
protected

Method updates a FE/BE user record - in this case a new password string will be set.

Parameters
string$tableDatabase table of this user, usually 'be_users' or 'fe_users'
int$uid‪uid of user record that will be updated
string$newPassword‪Field values as key=>value pairs to be updated in database

Definition at line 372 of file AuthenticationService.php.

◆ writeLogMessage()

TYPO3\CMS\Core\Authentication\AuthenticationService::writeLogMessage ( string  $message,
  $params 
)
protected

Writes log message. Destination log depends on the current system mode.

This function accepts variable number of arguments and can format parameters. The syntax is the same as for sprintf() If a marker ###IP### is present in the message, it is automatically replaced with the REMOTE_ADDR

Parameters
string$message‪Message to output
array<int,mixed>‪$params

Definition at line 393 of file AuthenticationService.php.