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

Public Member Functions

 init ()
 
 compareUident (array $user, array $loginData, $passwordCompareStrategy= '')
 
 authUser (array $user)
 
 writeLogMessage ($message)
 
- 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 ()
 

Public Attributes

 $prefixId = 'tx_saltedpasswords_sv1'
 
 $scriptRelPath = 'sv1/class.tx_saltedpasswords_sv1.php'
 
 $extKey = 'saltedpasswords'
 
- Public Attributes inherited from AbstractAuthenticationService
 $pObj
 
 $mode
 
 $login = array()
 
 $authInfo = array()
 
 $db_user = array()
 
 $db_groups = array()
 
 $writeAttemptLog = false
 
 $writeDevLog = false
 
- Public Attributes inherited from AbstractService
 $info = array()
 
 $error = array()
 
 $writeDevLog = false
 
 $out = ''
 
 $inputFile = ''
 
 $inputContent = ''
 
 $inputType = ''
 
 $outputFile = ''
 
 $tempFiles = array()
 

Protected Member Functions

 updatePassword ($uid, $updateFields)
 

Protected Attributes

 $extConf
 
 $objInstanceSaltedPW = null
 
 $authenticationFailed = false
 

Detailed Description

Class implements salted-password hashes authentication service. Contains authentication service class for salted hashed passwords.

Since
2009-06-14

Definition at line 22 of file SaltedPasswordService.php.

Member Function Documentation

authUser ( array  $user)

Method adds a further authUser method.

Will return one of following authentication status codes:

  • 0 - authentication failure
  • 100 - just go on. User is not authenticated but there is still no reason to stop
  • 200 - the service was able to authenticate the user
Parameters
arrayArray containing FE user data of the logged user.
Returns
int Authentication statuscode, one of 0,100 and 200

Definition at line 171 of file SaltedPasswordService.php.

References SaltedPasswordService\compareUident(), elseif, AbstractAuthenticationService\writelog(), and SaltedPasswordService\writeLogMessage().

compareUident ( array  $user,
array  $loginData,
  $passwordCompareStrategy = '' 
)

Checks the login data with the user record data for builtin login method.

Parameters
array$userUser data array
array$loginDataLogin data array
string$passwordCompareStrategyPassword compare strategy
Returns
bool TRUE if login data matched

Definition at line 101 of file SaltedPasswordService.php.

References elseif, and SaltedPasswordService\updatePassword().

Referenced by SaltedPasswordService\authUser().

init ( )

Checks if service is available. In case of this service we check that following prerequesties are fulfilled:

  • loginSecurityLevel of according TYPO3_MODE is set to normal
Returns
bool TRUE if service is available

Definition at line 77 of file SaltedPasswordService.php.

References AbstractAuthenticationService\$mode, and elseif.

updatePassword (   $uid,
  $updateFields 
)
protected

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

Parameters
int$uiduid of user record that will be updated
mixed$updateFieldsField values as key=>value pairs to be updated in database
Returns
void

Definition at line 223 of file SaltedPasswordService.php.

References $GLOBALS.

Referenced by SaltedPasswordService\compareUident().

writeLogMessage (   $message)

Writes log message. Destination log depends on the current system mode. For FE the function writes to the admin panel log. For BE messages are sent to the system log. If developer log is enabled, messages are also sent there.

This function accepts variable number of arguments and can format parameters. The syntax is the same as for sprintf()

Parameters
string$messageMessage to output
Returns
void
See Also
::sysLog()

Definition at line 242 of file SaltedPasswordService.php.

References $GLOBALS.

Referenced by SaltedPasswordService\authUser().

Member Data Documentation

$authenticationFailed = false
protected

Definition at line 68 of file SaltedPasswordService.php.

$extConf
protected

Definition at line 50 of file SaltedPasswordService.php.

$extKey = 'saltedpasswords'

Definition at line 43 of file SaltedPasswordService.php.

$objInstanceSaltedPW = null
protected

Definition at line 58 of file SaltedPasswordService.php.

$prefixId = 'tx_saltedpasswords_sv1'

Definition at line 29 of file SaltedPasswordService.php.

$scriptRelPath = 'sv1/class.tx_saltedpasswords_sv1.php'

Definition at line 36 of file SaltedPasswordService.php.