TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Sv\AuthenticationService Class Reference
Inheritance diagram for TYPO3\CMS\Sv\AuthenticationService:
TYPO3\CMS\Sv\AbstractAuthenticationService TYPO3\CMS\Core\Service\AbstractService TYPO3\CMS\Rsaauth\RsaAuthService

Public Member Functions

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

Protected Member Functions

 getDatabaseConnection ()
 

Additional Inherited Members

- Public Attributes inherited from TYPO3\CMS\Sv\AbstractAuthenticationService
 $pObj
 
 $mode
 
 $login = []
 
 $authInfo = []
 
 $db_user = []
 
 $db_groups = []
 
 $writeAttemptLog = false
 
 $writeDevLog = false
 
- Public Attributes inherited from TYPO3\CMS\Core\Service\AbstractService
 $info = []
 
 $error = []
 
 $writeDevLog = false
 
 $out = ''
 
 $inputFile = ''
 
 $inputContent = ''
 
 $inputType = ''
 
 $outputFile = ''
 
 $tempFiles = []
 
- Protected Attributes inherited from TYPO3\CMS\Core\Service\AbstractService
 $shutdownRegistry = []
 
 $prefixId = ''
 

Detailed Description

Authentication services class

Definition at line 22 of file AuthenticationService.php.

Member Function Documentation

◆ authUser()

TYPO3\CMS\Sv\AuthenticationService::authUser ( array  $user)

Authenticate a user (Check various conditions for the user that might invalidate its authentication, eg. password match, domain, IP, etc.)

Parameters
array$userData of user.
Returns
int >= 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.

Definition at line 88 of file AuthenticationService.php.

References TYPO3\CMS\Sv\AbstractAuthenticationService\compareUident(), TYPO3\CMS\Core\Utility\GeneralUtility\devLog(), TYPO3\CMS\Core\Utility\GeneralUtility\SYSLOG_SEVERITY_WARNING, and TYPO3\CMS\Sv\AbstractAuthenticationService\writelog().

◆ getDatabaseConnection()

TYPO3\CMS\Sv\AuthenticationService::getDatabaseConnection ( )
protected

Returns the database connection

Returns

Definition at line 233 of file AuthenticationService.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Sv\AuthenticationService\getGroups(), and TYPO3\CMS\Sv\AuthenticationService\getSubGroups().

◆ getGroups()

TYPO3\CMS\Sv\AuthenticationService::getGroups (   $user,
  $knownGroups 
)

Find usergroup records, currently only for frontend

Parameters
array$userData of user.
array$knownGroupsGroup 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 126 of file AuthenticationService.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\cmpIP(), TYPO3\CMS\Core\Utility\GeneralUtility\devLog(), TYPO3\CMS\Sv\AuthenticationService\getDatabaseConnection(), and TYPO3\CMS\Sv\AuthenticationService\getSubGroups().

◆ getSubGroups()

TYPO3\CMS\Sv\AuthenticationService::getSubGroups (   $grList,
  $idList = '',
$groups 
)

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

Parameters
string$grListCommalist of fe_groups uid numbers
string$idListList of already processed fe_groups-uids so the function will not fall into an eternal recursion.
array$groups
Returns
array private

Definition at line 189 of file AuthenticationService.php.

References $uid, TYPO3\CMS\Sv\AuthenticationService\getDatabaseConnection(), TYPO3\CMS\Core\Utility\GeneralUtility\inList(), and TYPO3\CMS\Core\Utility\GeneralUtility\intExplode().

Referenced by TYPO3\CMS\Sv\AuthenticationService\getGroups().

◆ getUser()

TYPO3\CMS\Sv\AuthenticationService::getUser ( )

◆ processLoginData()

TYPO3\CMS\Sv\AuthenticationService::processLoginData ( array &  $loginData,
  $passwordTransmissionStrategy 
)

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

Parameters
array$loginDataCredentials that are submitted and potentially modified by other services
string$passwordTransmissionStrategyKeyword of how the password has been hashed or encrypted before submission
Returns
bool

Definition at line 32 of file AuthenticationService.php.