AbstractAuthenticationService

class \TYPO3\CMS\Core\Authentication\AbstractAuthenticationService

Implements
LoggerAwareInterface
Uses
LoggerAwareTrait

Authentication services class

Table of Contents

Interfaces

LoggerAwareInterface

Properties

$authInfo  : array
Various data
$db_user  : array
User db table definition
$info  : array
$login  : array
Submitted login form data
$mode  : string
Subtype of the service which is used to call the service.
$pObj  : AbstractUserAuthentication
User object
$writeAttemptLog  : bool
If the writelog() functions is called if a login-attempt has be tried without success

Methods

fetchUserRecord()  : array<string, mixed>|false
Get a user from DB by username
getLastErrorArray()  : array
getServiceKey()  : string
Returns the service key of the service
getServiceOption()  : mixed
Returns service configuration values from the $TYPO3_CONF_VARS['SVCONF'] array
getServiceTitle()  : string
Returns the title of the service
init()  : bool
Initialization of the service.
initAuth()  : mixed
Initialize authentication service
reset()  : mixed
Resets the service.
writelog()  : mixed
Writes to log database table in pObj

Properties

$authInfo

Various data

public array $authInfo = []

$db_user

User db table definition

public array $db_user = []

$info

public array $info = []

service description array

$login

Submitted login form data

public array $login = []

$mode

Subtype of the service which is used to call the service.

public string $mode

$writeAttemptLog

If the writelog() functions is called if a login-attempt has be tried without success

public bool $writeAttemptLog = false

Methods

fetchUserRecord()

Get a user from DB by username

public fetchUserRecord(string $username[, string $extraWhere = '' ][, array|string $dbUserSetup = '' ]) : array<string, mixed>|false

Parameters

$username : string

User name

$extraWhere : string = ''

Additional WHERE clause: " AND ...

$dbUserSetup : array|string = ''

User db table definition, or empty string for $this->db_user

Return values

array<string, mixed>|false —

User array or FALSE

getLastErrorArray()

public getLastErrorArray() : array

Return values

array

getServiceKey()

Returns the service key of the service

public getServiceKey() : string

Return values

string —

Service key

getServiceOption()

Returns service configuration values from the $TYPO3_CONF_VARS['SVCONF'] array

public getServiceOption(string $optionName[, mixed $defaultValue = '' ][, bool $includeDefaultConfig = true ]) : mixed

Parameters

$optionName : string

Name of the config option

$defaultValue : mixed = ''

Default configuration if no special config is available

$includeDefaultConfig : bool = true

If set the 'default' config will be returned if no special config for this service is available (default: TRUE)

Return values

mixed —

Configuration value for the service

getServiceTitle()

Returns the title of the service

public getServiceTitle() : string

Return values

string —

Service title

init()

Initialization of the service.

public init() : bool

This is a stub as needed by GeneralUtility::makeInstanceService()

Return values

bool

initAuth()

Initialize authentication service

public initAuth(string $mode, array $loginData, array $authInfo, AbstractUserAuthentication $pObj) : mixed

Parameters

$mode : string

Subtype of the service which is used to call the service.

$loginData : array

Submitted login form data

$authInfo : array

Information array. Holds submitted form data etc.

$pObj : AbstractUserAuthentication

Parent object

reset()

Resets the service.

public reset() : mixed

This is a stub as needed by GeneralUtility::makeInstanceService()

writelog()

Writes to log database table in pObj

public writelog(int $type, int $action, int $error, int $details_nr, string $details, array $data[, string $tablename = '' ][, int|string $recuid = '' ][, int|string $recpid = '' ]) : mixed

Parameters

$type : int

denotes which module that has submitted the entry. This is the current list: 1=tce_db; 2=tce_file; 3=system (eg. sys_history save); 4=modules; 254=Personal settings changed; 255=login / out action: 1=login, 2=logout, 3=failed login (+ errorcode 3), 4=failure_warning_email sent

$action : int

denotes which specific operation that wrote the entry (eg. 'delete', 'upload', 'update' and so on...). Specific for each $type. Also used to trigger update of the interface. (see the log-module for the meaning of each number !!)

$error : int

flag. 0 = message, 1 = error (user problem), 2 = System Error (which should not happen), 3 = security notice (admin)

$details_nr : int

The message number. Specific for each $type and $action. in the future this will make it possible to translate error messages to other languages

$details : string

Default text that follows the message

$data : array

Data that follows the log. Might be used to carry special information. If an array the first 5 entries (0-4) will be sprintf'ed the details-text...

$tablename : string = ''

Special field used by tce_main.php. These ($tablename, $recuid, $recpid) holds the reference to the record which the log-entry is about. (Was used in attic status.php to update the interface.)

$recuid : int|string = ''

Special field used by tce_main.php. These ($tablename, $recuid, $recpid) holds the reference to the record which the log-entry is about. (Was used in attic status.php to update the interface.)

$recpid : int|string = ''

Special field used by tce_main.php. These ($tablename, $recuid, $recpid) holds the reference to the record which the log-entry is about. (Was used in attic status.php to update the interface.)

On this page