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

Public Member Functions

 __construct (FrontendUserAuthentication $frontendUser,\Closure $validationFailedCallback=null)
 
 persistSessionToken ()
 
- Public Member Functions inherited from AbstractFormProtection
 __destruct ()
 
 clean ()
 
 generateToken ($formName, $action= '', $formInstanceName= '')
 
 validateToken ($tokenId, $formName, $action= '', $formInstanceName= '')
 
 persistSessionToken ()
 

Protected Member Functions

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

Protected Attributes

 $frontendUser
 
- Protected Attributes inherited from AbstractFormProtection
 $validationFailedCallback
 
 $sessionToken
 

Detailed Description

Frontend form protection

Definition at line 74 of file FrontendFormProtection.php.

Constructor & Destructor Documentation

__construct ( FrontendUserAuthentication  $frontendUser,
\Closure  $validationFailedCallback = null 
)

Only allow construction if we have an authorized frontend session

Parameters
FrontendUserAuthentication$frontendUser
\Closure$validationFailedCallback
Exceptions
\TYPO3\CMS\Core\Error\Exception

Definition at line 91 of file FrontendFormProtection.php.

References FrontendFormProtection\$frontendUser, AbstractFormProtection\$validationFailedCallback, and FrontendFormProtection\isAuthorizedFrontendSession().

Member Function Documentation

isAuthorizedFrontendSession ( )
protected

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

Returns
bool

Definition at line 132 of file FrontendFormProtection.php.

Referenced by FrontendFormProtection\__construct().

persistSessionToken ( )

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

private

Returns
void

Definition at line 122 of file FrontendFormProtection.php.

Referenced by FrontendFormProtection\retrieveSessionToken().

retrieveSessionToken ( )
protected

Retrieves the saved session token or generates a new one.

Returns
string

Definition at line 105 of file FrontendFormProtection.php.

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

Member Data Documentation

$frontendUser
protected

Definition at line 82 of file FrontendFormProtection.php.

Referenced by FrontendFormProtection\__construct().