‪TYPO3CMS  11.5
TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication Class Reference
Inheritance diagram for TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication:
TYPO3\CMS\Core\Authentication\BackendUserAuthentication TYPO3\CMS\Core\Authentication\AbstractUserAuthentication

Public Member Functions

 __construct ()
 
 start (ServerRequestInterface $request=null)
 
 checkAuthentication (ServerRequestInterface $request=null)
 
 getOriginalUserIdWhenInSwitchUserMode ()
 
 authenticate ()
 
 backendCheckLogin ($proceedIfNoUserIsLoggedIn=null)
 
bool isUserAllowedToLogin ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
bool isAdmin ()
 
bool isMemberOfGroup ($groupId)
 
bool doesUserHaveAccess ($row, $perms)
 
int null isInWebMount ($idOrRow, $readPerms='', $exitOnError=null)
 
bool modAccess ($conf)
 
bool isSystemMaintainer ()
 
string getPagePermsClause ($perms)
 
int calcPerms ($row)
 
bool isRTE ()
 
bool check ($type, $value)
 
bool checkAuthMode ($table, $field, $value, $authMode)
 
bool checkLanguageAccess ($langValue)
 
bool checkFullLanguagesAccess ($table, $record)
 
bool recordEditAccessInternals ($table, $idOrRow, $newRecord=false, $deletedRecord=false, $checkFullLanguageAccess=false)
 
bool mayMakeShortcut ()
 
bool workspaceAllowsLiveEditingInTable (string $table)
 
bool workspaceCanCreateNewRecord (string $table)
 
bool workspaceCheckStageForCurrent ($stage)
 
bool workspacePublishAccess ($wsid)
 
array getTSConfig ()
 
array returnWebmounts ()
 
 setWebmounts (array $mountPointUids, $append=false)
 
 initializeWebmountsForElementBrowser ()
 
bool jsConfirmation ($bitmask)
 
 fetchGroupData ()
 
array getCategoryMountPoints ()
 
array getFileMountRecords ()
 
TYPO3 CMS Core Resource ResourceStorage[] getFileStorages ()
 
 evaluateUserSpecificFileFilterSettings ()
 
array getFilePermissions ()
 
array getFilePermissionsForStorage (ResourceStorage $storageObject)
 
TYPO3 CMS Core Resource Folder false getDefaultUploadFolder ($pid=null, $table=null, $field=null)
 
TYPO3 CMS Core Resource Folder null getDefaultUploadTemporaryFolder ()
 
 workspaceInit ()
 
array checkWorkspace ($wsRec, $fields=' *')
 
array checkWorkspaceCurrent ()
 
 setWorkspace ($workspaceId)
 
bool setTemporaryWorkspace ($workspaceId)
 
 setDefaultWorkspace ()
 
int getDefaultWorkspace ()
 
int writelog ($type, $action, $error, $details_nr, $details, $data, $tablename='', $recuid='', $recpid='', $event_pid=-1, $NEWid='', $userId=0)
 
 initializeBackendLogin ()
 
 backendSetUC ()
 
 overrideUC ()
 
 resetUC ()
 
 logoff ()
 
bool isMfaSetupRequired ()
 
 isImportEnabled ()
 
 isExportEnabled ()
 
 shallDisplayDebugInformation ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
 initializeUserSessionManager (?UserSessionManager $userSessionManager=null)
 
ResponseInterface appendCookieToResponse (ResponseInterface $response)
 
bool isSetSessionCookie ()
 
bool isRefreshTimeBasedCookie ()
 
string createSessionId ()
 
UserSession createUserSession (array $tempuser)
 
array bool fetchUserSession ($skipSessionUpdate=false)
 
 enforceNewSessionId ()
 
 removeCookie ($cookieName=null)
 
bool isCookieSet ()
 
 writeUC ($variable='')
 
 unpack_uc ($theUC='')
 
 pushModuleData ($module, $data, $noSave=0)
 
mixed getModuleData ($module, $type='')
 
mixed getSessionData ($key)
 
 setSessionData ($key, $data)
 
 setAndSaveSessionData ($key, $data)
 
array getLoginFormData ()
 
 isActiveLogin (ServerRequestInterface $request)
 
array processLoginData ($loginData)
 
array getAuthInfoArray ()
 
 writelog ($type, $action, $error, $details_nr, $details, $data, $tablename, $recuid, $recpid)
 
 setBeUserByUid ($uid)
 
 setBeUserByName ($name)
 
array getRawUserByUid ($uid)
 
array getRawUserByName ($name)
 
UserSession getSession ()
 
 __isset (string $propertyName)
 
 __set (string $propertyName, $propertyValue)
 
 __get (string $propertyName)
 
 __unset (string $propertyName)
 

Protected Member Functions

bool checkIfCliUserExists ()
 
 createCliUser ()
 
string generateHashedPassword ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
array filterValidWebMounts (string $listOfWebMounts)
 
 prepareUserTsConfig ()
 
 initializeFileStorages ()
 
 initializeDbMountpointsInWorkspace ()
 
 hasEditAccessToLiveWorkspace ()
 
 releaseLockedRecords (int $userId)
 
 evaluateMfaRequirements ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
 setSessionCookie ()
 
string getCookieDomain ()
 
string getCookie ($cookieName)
 
array getAuthServiceConfiguration ()
 
 handleLoginFailure ()
 
Traversable getAuthServices (string $subType, array $loginData, array $authInfo)
 
 regenerateSessionId ()
 
 updateLoginTimestamp (int $userId)
 
array null fetchValidUserFromSessionOrDestroySession (bool $skipSessionUpdate=false)
 
 performLogoff ()
 
QueryRestrictionContainerInterface userConstraints ()
 
mixed removeSensitiveLoginDataForLoggingInfo ($data, bool $isUserRecord=false)
 

Protected Attributes

string $username = '_cli_'
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
array $userTS = array( )
 
bool $userTSUpdated = false
 
array null $checkWorkspaceCurrent_cache
 
TYPO3 CMS Core Resource ResourceStorage[] $fileStorages
 
array null $filePermissions
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
int $lifetime = 0
 
UserSession $userSession = null
 
UserSessionManager $userSessionManager
 
Cookie $setCookie = null
 

Additional Inherited Members

- ‪Static Public Member Functions inherited from ‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
static string getCookieName ()
 
- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
const ROLE_SYSTEMMAINTAINER = 'systemMaintainer'
 
string $usergroup_column = 'usergroup'
 
string $usergroup_table = 'be_groups'
 
array $groupData
 
array $userGroupsUID = array( )
 
int $workspace = -99
 
array $workspaceRec = array( )
 
string $errorMsg = ''
 
string $user_table = 'be_users'
 
string $username_column = 'username'
 
string $userident_column = 'password'
 
string $userid_column = 'uid'
 
string $lastLogin_column = 'lastlogin'
 
array $enablecolumns
 
string $formfield_uname = 'username'
 
string $formfield_uident = 'userident'
 
string $formfield_status = 'login_status'
 
bool $writeStdLog = true
 
bool $writeAttemptLog = true
 
int $firstMainGroup = 0
 
array string $uc
 
array $uc_default
 
string $loginType = 'BE'
 
- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
string $name = ''
 
string $user_table = ''
 
string $usergroup_table = ''
 
string $username_column = ''
 
string $userident_column = ''
 
string $userid_column = ''
 
string $usergroup_column = ''
 
string $lastLogin_column = ''
 
array $enablecolumns
 
string $formfield_uname = ''
 
string $formfield_uident = ''
 
string $formfield_status = ''
 
bool $writeStdLog = false
 
bool $writeAttemptLog = false
 
bool $checkPid = true
 
int string $checkPid_value = 0
 
bool $loginSessionStarted = false
 
array null $user
 
array $userGroups = []
 
bool $dontSetCookie = false
 
string $loginType = ''
 
array $uc
 

Detailed Description

TYPO3 backend user authentication on a CLI level Auto-logs in, only allowed on CLI

Definition at line 30 of file CommandLineUserAuthentication.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication::__construct ( )

Member Function Documentation

◆ authenticate()

◆ backendCheckLogin()

TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication::backendCheckLogin (   $proceedIfNoUserIsLoggedIn = null)

Logs in the TYPO3 Backend user "_cli_"

Parameters
bool | null$proceedIfNoUserIsLoggedIn‪if this option is set, then there won't be a redirect to the login screen of the Backend - used for areas in the backend which do not need user rights like the login page.

Reimplemented from TYPO3\CMS\Core\Authentication\BackendUserAuthentication.

Definition at line 116 of file CommandLineUserAuthentication.php.

References TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication\authenticate().

◆ checkAuthentication()

TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication::checkAuthentication ( ServerRequestInterface  $request = null)

Replacement for AbstractUserAuthentication::checkAuthentication()

Not required in CLI mode, therefore empty.

Reimplemented from TYPO3\CMS\Core\Authentication\AbstractUserAuthentication.

Definition at line 72 of file CommandLineUserAuthentication.php.

◆ checkIfCliUserExists()

bool TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication::checkIfCliUserExists ( )
protected

Check if a user with username "_cli_" exists. Deleted users are left out but hidden and start / endtime restricted users are considered.

Returns
‪bool true if the user exists

Definition at line 139 of file CommandLineUserAuthentication.php.

Referenced by TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication\authenticate().

◆ createCliUser()

TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication::createCliUser ( )
protected

◆ generateHashedPassword()

string TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication::generateHashedPassword ( )
protected

This function returns a salted hashed key.

Returns
‪string a random password

Definition at line 177 of file CommandLineUserAuthentication.php.

Referenced by TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication\createCliUser().

◆ getOriginalUserIdWhenInSwitchUserMode()

TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication::getOriginalUserIdWhenInSwitchUserMode ( )

On CLI there is no session and no switched user

Reimplemented from TYPO3\CMS\Core\Authentication\BackendUserAuthentication.

Definition at line 80 of file CommandLineUserAuthentication.php.

◆ isUserAllowedToLogin()

bool TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication::isUserAllowedToLogin ( )

Determines whether a CLI backend user is allowed to access TYPO3. Only when adminOnly is off (=0), and only allowed for admins and CLI users (=2)

Returns
‪bool Whether the CLI user is allowed to access TYPO3

Reimplemented from TYPO3\CMS\Core\Authentication\BackendUserAuthentication.

Definition at line 128 of file CommandLineUserAuthentication.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication\__construct().

◆ start()

TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication::start ( ServerRequestInterface  $request = null)

Replacement for AbstractUserAuthentication::start()

We do not need support for sessions, cookies, $_GET-modes, the postUserLookup hook or a database connection during CLI Bootstrap

Parameters
ServerRequestInterface | null$request

Reimplemented from TYPO3\CMS\Core\Authentication\AbstractUserAuthentication.

Definition at line 62 of file CommandLineUserAuthentication.php.

Member Data Documentation

◆ $username

string TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication::$username = '_cli_'
protected

The username of the CLI user (there is only one)

Definition at line 35 of file CommandLineUserAuthentication.php.

Referenced by TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication\createCliUser().