Backend\Core\Engine\Model::getToken PHP Méthode

getToken() public static méthode

Get the token which will protect us
public static getToken ( ) : string
Résultat string
    public static function getToken()
    {
        if (\SpoonSession::exists('csrf_token') && \SpoonSession::get('csrf_token') != '') {
            $token = \SpoonSession::get('csrf_token');
        } else {
            $token = self::generateRandomString(10, true, true, false, false);
            \SpoonSession::set('csrf_token', $token);
        }
        return $token;
    }