Backend\Core\Engine\Model::getToken PHP Method

getToken() public static method

Get the token which will protect us
public static getToken ( ) : string
return 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;
    }