PHP Class Contao\RequestToken
The class tries to read and validate the request token from the user session
and creates a new token if there is none.
Usage:
echo RequestToken::get();
if (!RequestToken::validate('TOKEN'))
{
throw new Exception("Invalid request token");
}
Mostrar archivo
Open project: contao/core-bundle
Class Usage Examples
Public Methods
Method Details
get()
public static method
initialize()
public static method
Read the token from the session or generate a new one
validate()
public static method