AntiSpamUtilityTrait
Trait AntiSpamUtilityTrait
Tags
Table of Contents
- generateSecretAntiSpamToken() : string
- will generate random id and timestamp when the form is allowed to be processed value will be stored in session, under key "sast" (Secret Anti Spam Token), so it can be validated by "sendAntiSpamInputIsValid" upon sending
- sendAntiSpamInputIsValid() : bool
- Validates if transmitted Secret Anti Spam Token is the stored one and if enough time has passed since originally generating it
Methods
generateSecretAntiSpamToken()
will generate random id and timestamp when the form is allowed to be processed value will be stored in session, under key "sast" (Secret Anti Spam Token), so it can be validated by "sendAntiSpamInputIsValid" upon sending
private
generateSecretAntiSpamToken() : string
Tags
Return values
string —sendAntiSpamInputIsValid()
Validates if transmitted Secret Anti Spam Token is the stored one and if enough time has passed since originally generating it
private
sendAntiSpamInputIsValid(string $value) : bool
Parameters
- $value : string
-
transmitted value of input named "ae6b85682663ab4570bd10c67b83d21fe77cdf97"