TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Saltedpasswords\SaltedPasswordService Class Reference
Inheritance diagram for TYPO3\CMS\Saltedpasswords\SaltedPasswordService:
TYPO3\CMS\Sv\AbstractAuthenticationService TYPO3\CMS\Core\Service\AbstractService

Public Member Functions

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

Public Attributes

 $prefixId = 'tx_saltedpasswords_sv1'
 
 $scriptRelPath = 'sv1/class.tx_saltedpasswords_sv1.php'
 
 $extKey = 'saltedpasswords'
 
- 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 Member Functions

 updatePassword ($uid, $updateFields)
 

Protected Attributes

 $extConf
 
 $objInstanceSaltedPW = null
 
 $authenticationFailed = false
 
- Protected Attributes inherited from TYPO3\CMS\Core\Service\AbstractService
 $shutdownRegistry = []
 
 $prefixId = ''
 

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()

TYPO3\CMS\Saltedpasswords\SaltedPasswordService::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 172 of file SaltedPasswordService.php.

References TYPO3\CMS\Saltedpasswords\SaltedPasswordService\compareUident(), TYPO3\CMS\Sv\AbstractAuthenticationService\writelog(), and TYPO3\CMS\Saltedpasswords\SaltedPasswordService\writeLogMessage().

◆ compareUident()

TYPO3\CMS\Saltedpasswords\SaltedPasswordService::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 TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility\getDefaultSaltingHashingMethod(), TYPO3\CMS\Saltedpasswords\Salt\SaltFactory\getSaltingInstance(), and TYPO3\CMS\Saltedpasswords\SaltedPasswordService\updatePassword().

Referenced by TYPO3\CMS\Saltedpasswords\SaltedPasswordService\authUser().

◆ init()

TYPO3\CMS\Saltedpasswords\SaltedPasswordService::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 TYPO3\CMS\Sv\AbstractAuthenticationService\$mode, and TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility\returnExtConf().

◆ updatePassword()

TYPO3\CMS\Saltedpasswords\SaltedPasswordService::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, $uid, and TYPO3\CMS\Core\Utility\GeneralUtility\devLog().

Referenced by TYPO3\CMS\Saltedpasswords\SaltedPasswordService\compareUident().

◆ writeLogMessage()

TYPO3\CMS\Saltedpasswords\SaltedPasswordService::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, $params, and TYPO3\CMS\Core\Utility\GeneralUtility\devLog().

Referenced by TYPO3\CMS\Saltedpasswords\SaltedPasswordService\authUser().

Member Data Documentation

◆ $authenticationFailed

TYPO3\CMS\Saltedpasswords\SaltedPasswordService::$authenticationFailed = false
protected

Definition at line 68 of file SaltedPasswordService.php.

◆ $extConf

TYPO3\CMS\Saltedpasswords\SaltedPasswordService::$extConf
protected

Definition at line 50 of file SaltedPasswordService.php.

◆ $extKey

TYPO3\CMS\Saltedpasswords\SaltedPasswordService::$extKey = 'saltedpasswords'

Definition at line 43 of file SaltedPasswordService.php.

◆ $objInstanceSaltedPW

TYPO3\CMS\Saltedpasswords\SaltedPasswordService::$objInstanceSaltedPW = null
protected

Definition at line 58 of file SaltedPasswordService.php.

◆ $prefixId

TYPO3\CMS\Saltedpasswords\SaltedPasswordService::$prefixId = 'tx_saltedpasswords_sv1'

Definition at line 29 of file SaltedPasswordService.php.

◆ $scriptRelPath

TYPO3\CMS\Saltedpasswords\SaltedPasswordService::$scriptRelPath = 'sv1/class.tx_saltedpasswords_sv1.php'

Definition at line 36 of file SaltedPasswordService.php.