TYPO3  7.6
Public Member Functions | Protected Member Functions | List of all members
AuthenticationService Class Reference
Inheritance diagram for AuthenticationService:
AbstractAuthenticationService AbstractService RsaAuthService

Public Member Functions

 processLoginData (array &$loginData, $passwordTransmissionStrategy)
 
 getUser ()
 
 authUser (array $user)
 
 getGroups ($user, $knownGroups)
 
 getSubGroups ($grList, $idList= '', &$groups)
 
- Public Member Functions inherited from 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 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 AbstractAuthenticationService
 $pObj
 
 $mode
 
 $login = array()
 
 $authInfo = array()
 
 $db_user = array()
 
 $db_groups = array()
 
 $writeAttemptLog = false
 
 $writeDevLog = false
 
- Protected Attributes inherited from AbstractService
 $shutdownRegistry = array()
 
 $prefixId = ''
 

Detailed Description

Authentication services class

Definition at line 22 of file AuthenticationService.php.

Member Function Documentation

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 AbstractAuthenticationService\compareUident(), GeneralUtility\devLog(), GeneralUtility\SYSLOG_SEVERITY_WARNING, and AbstractAuthenticationService\writelog().

getDatabaseConnection ( )
protected

Returns the database connection

Returns

Definition at line 221 of file AuthenticationService.php.

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 124 of file AuthenticationService.php.

References $GLOBALS, $list, GeneralUtility\cmpIP(), GeneralUtility\devLog(), and AuthenticationService\getSubGroups().

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 182 of file AuthenticationService.php.

Referenced by AuthenticationService\getGroups().

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 47 of file AuthenticationService.php.

References GeneralUtility\arrayToLogString(), GeneralUtility\devLog(), AbstractAuthenticationService\fetchUserRecord(), GeneralUtility\SYSLOG_SEVERITY_WARNING, and AbstractAuthenticationService\writelog().

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.