‪TYPO3CMS  10.4
TYPO3\CMS\Install\Authentication\AuthenticationService Class Reference

Public Member Functions

 __construct (SessionService $sessionService)
 
bool loginWithPassword ($password, ServerRequestInterface $request)
 

Protected Member Functions

 sendLoginSuccessfulMail (ServerRequestInterface $request)
 
 sendLoginFailedMail (ServerRequestInterface $request)
 
 sendEmail (RawMessage $email)
 
string getSenderEmailAddress ()
 
string getSenderEmailName ()
 

Protected Attributes

SessionService $sessionService
 
TemplatePaths $templatePaths
 

Detailed Description

Authenticates a user (currently comparing it through the install tool password, but could be extended)

only to be used within EXT:install

Definition at line 38 of file AuthenticationService.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Install\Authentication\AuthenticationService::__construct ( SessionService  $sessionService)
Parameters
SessionService$sessionService

Definition at line 51 of file AuthenticationService.php.

References $GLOBALS, and TYPO3\CMS\Install\Authentication\AuthenticationService\$sessionService.

Member Function Documentation

◆ getSenderEmailAddress()

string TYPO3\CMS\Install\Authentication\AuthenticationService::getSenderEmailAddress ( )
protected

Get sender address from configuration ['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] If this setting is empty fall back to 'no-re.nosp@m.ply@.nosp@m.examp.nosp@m.le.c.nosp@m.om'

Returns
‪string Returns an email address

Definition at line 162 of file AuthenticationService.php.

References TYPO3\CMS\Core\Utility\MailUtility\getSystemFromAddress().

Referenced by TYPO3\CMS\Install\Authentication\AuthenticationService\sendEmail(), TYPO3\CMS\Install\Authentication\AuthenticationService\sendLoginFailedMail(), and TYPO3\CMS\Install\Authentication\AuthenticationService\sendLoginSuccessfulMail().

◆ getSenderEmailName()

string TYPO3\CMS\Install\Authentication\AuthenticationService::getSenderEmailName ( )
protected

Gets sender name from configuration ['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'] If this setting is empty, it falls back to a default string.

Returns
‪string

Definition at line 174 of file AuthenticationService.php.

References TYPO3\CMS\Core\Utility\MailUtility\getSystemFromName().

Referenced by TYPO3\CMS\Install\Authentication\AuthenticationService\sendLoginFailedMail(), and TYPO3\CMS\Install\Authentication\AuthenticationService\sendLoginSuccessfulMail().

◆ loginWithPassword()

bool TYPO3\CMS\Install\Authentication\AuthenticationService::loginWithPassword (   $password,
ServerRequestInterface  $request 
)

Checks against a given password

Parameters
string | null$password
ServerRequestInterface$request
Returns
‪bool if authentication was successful, otherwise false

Definition at line 66 of file AuthenticationService.php.

References $GLOBALS, TYPO3\CMS\Install\Authentication\AuthenticationService\sendLoginFailedMail(), and TYPO3\CMS\Install\Authentication\AuthenticationService\sendLoginSuccessfulMail().

◆ sendEmail()

TYPO3\CMS\Install\Authentication\AuthenticationService::sendEmail ( RawMessage  $email)
protected

Sends an email and gracefully logs if the mail could not be sent due to configuration errors.

Parameters
RawMessage$email
Exceptions

Definition at line 136 of file AuthenticationService.php.

References TYPO3\CMS\Install\Authentication\AuthenticationService\getSenderEmailAddress().

Referenced by TYPO3\CMS\Install\Authentication\AuthenticationService\sendLoginFailedMail(), and TYPO3\CMS\Install\Authentication\AuthenticationService\sendLoginSuccessfulMail().

◆ sendLoginFailedMail()

TYPO3\CMS\Install\Authentication\AuthenticationService::sendLoginFailedMail ( ServerRequestInterface  $request)
protected

◆ sendLoginSuccessfulMail()

TYPO3\CMS\Install\Authentication\AuthenticationService::sendLoginSuccessfulMail ( ServerRequestInterface  $request)
protected

Member Data Documentation

◆ $sessionService

SessionService TYPO3\CMS\Install\Authentication\AuthenticationService::$sessionService
protected

◆ $templatePaths

TemplatePaths TYPO3\CMS\Install\Authentication\AuthenticationService::$templatePaths
protected

Definition at line 46 of file AuthenticationService.php.