TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BackendFormProtection Class Reference
Inheritance diagram for BackendFormProtection:
AbstractFormProtection

Public Member Functions

 __construct (BackendUserAuthentication $backendUser, Registry $registry,\Closure $validationFailedCallback=null)
 
 persistSessionToken ()
 
 setSessionTokenFromRegistry ()
 
 storeSessionTokenInRegistry ()
 
 removeSessionTokenFromRegistry ()
 
- Public Member Functions inherited from AbstractFormProtection
 __destruct ()
 
 clean ()
 
 generateToken ($formName, $action= '', $formInstanceName= '')
 
 validateToken ($tokenId, $formName, $action= '', $formInstanceName= '')
 
 persistSessionToken ()
 

Protected Member Functions

 retrieveSessionToken ()
 
 isAuthorizedBackendSession ()
 
- Protected Member Functions inherited from AbstractFormProtection
 getSessionToken ()
 
 generateSessionToken ()
 
 createValidationErrorMessage ()
 
 retrieveSessionToken ()
 

Protected Attributes

 $backendUser
 
 $registry
 
- Protected Attributes inherited from AbstractFormProtection
 $validationFailedCallback
 
 $sessionToken
 

Detailed Description

Backend form protection

Definition at line 76 of file BackendFormProtection.php.

Constructor & Destructor Documentation

__construct ( BackendUserAuthentication  $backendUser,
Registry  $registry,
\Closure  $validationFailedCallback = null 
)

Only allow construction if we have an authorized backend session

Parameters
BackendUserAuthentication$backendUser
Registry$registry
\Closure$validationFailedCallback
Exceptions
\TYPO3\CMS\Core\Error\Exception

Definition at line 102 of file BackendFormProtection.php.

References BackendFormProtection\$backendUser, BackendFormProtection\$registry, AbstractFormProtection\$validationFailedCallback, and BackendFormProtection\isAuthorizedBackendSession().

Member Function Documentation

isAuthorizedBackendSession ( )
protected

Checks if a user is logged in and the session is active.

Returns
bool

Definition at line 183 of file BackendFormProtection.php.

Referenced by BackendFormProtection\__construct().

persistSessionToken ( )

Saves the tokens so that they can be used by a later incarnation of this class.

private

Returns
void

Definition at line 134 of file BackendFormProtection.php.

Referenced by BackendFormProtection\retrieveSessionToken().

removeSessionTokenFromRegistry ( )

Removes the session token for the user from the registry.

private

Definition at line 173 of file BackendFormProtection.php.

retrieveSessionToken ( )
protected

Retrieves the saved session token or generates a new one.

Returns
string

Definition at line 117 of file BackendFormProtection.php.

References AbstractFormProtection\$sessionToken, AbstractFormProtection\generateSessionToken(), and BackendFormProtection\persistSessionToken().

setSessionTokenFromRegistry ( )

Sets the session token for the user from the registry and returns it additionally.

private

Returns
string
Exceptions
\UnexpectedValueException

Definition at line 147 of file BackendFormProtection.php.

References AbstractFormProtection\$sessionToken.

storeSessionTokenInRegistry ( )

Stores the session token in the registry to have it available during re-login of the user.

private

Returns
void

Definition at line 163 of file BackendFormProtection.php.

Member Data Documentation

$backendUser
protected

Definition at line 84 of file BackendFormProtection.php.

Referenced by BackendFormProtection\__construct().

$registry
protected

Definition at line 92 of file BackendFormProtection.php.

Referenced by BackendFormProtection\__construct().