TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Saltedpasswords\SaltedPasswordService Class Reference
Inheritance diagram for TYPO3\CMS\Saltedpasswords\SaltedPasswordService:
TYPO3\CMS\Sv\AbstractAuthenticationService TYPO3\CMS\Core\Service\AbstractService tx_saltedpasswords_sv1

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 = array()
 
 $authInfo = array()
 
 $db_user = array()
 
 $db_groups = array()
 
 $writeAttemptLog = FALSE
 
 $writeDevLog = FALSE
 
- Public Attributes inherited from TYPO3\CMS\Core\Service\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
 
- Protected Attributes inherited from TYPO3\CMS\Core\Service\AbstractService
 $shutdownRegistry = array()
 
 $prefixId = ''
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Contains authentication service class for salted hashed passwords. Class implements salted-password hashes authentication service.

Author
Marcus Krause <marcus::exp2009.info>
Steffen Ritter info@.nosp@m.rs-w.nosp@m.ebsys.nosp@m.tems.nosp@m..de
Since
2009-06-14

Definition at line 26 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
integer Authentication statuscode, one of 0,100 and 200

Definition at line 174 of file SaltedPasswordService.php.

References TYPO3\CMS\Saltedpasswords\SaltedPasswordService\compareUident(), TYPO3_MODE, 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
boolean TRUE if login data matched
Todo:
Define visibility

Definition at line 105 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
boolean TRUE if service is available

Definition at line 81 of file SaltedPasswordService.php.

References TYPO3\CMS\Sv\AbstractAuthenticationService\$mode, TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility\returnExtConf(), and TYPO3_MODE.

◆ 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
integer$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 225 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()
Todo:
Define visibility

Definition at line 244 of file SaltedPasswordService.php.

References $GLOBALS, TYPO3\CMS\Core\Utility\GeneralUtility\devLog(), and TYPO3_MODE.

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

Member Data Documentation

◆ $authenticationFailed

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

Definition at line 72 of file SaltedPasswordService.php.

◆ $extConf

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

Definition at line 54 of file SaltedPasswordService.php.

◆ $extKey

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

Definition at line 47 of file SaltedPasswordService.php.

◆ $objInstanceSaltedPW

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

Definition at line 62 of file SaltedPasswordService.php.

◆ $prefixId

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

Definition at line 33 of file SaltedPasswordService.php.

◆ $scriptRelPath

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

Definition at line 40 of file SaltedPasswordService.php.