<commit_before><?php

include_once 'session.php';

class WebSocketUser{

  public $socket;
  public $id;
  public $headers = array();
  public $handshake = false;

  public $handlingPartialPacket = false;
  public $partialBuffer = "";

  public $sendingContinuous = false;
  public $partialMessage = "";

  public $hasSentClose = false;

  public $authenticated = false;
  public $username = "";
  public $module = "";
  public $message = "";

  function __construct($id, $socket) {
    $this->id = $id;
    $this->socket = $socket;
  }

  public function authenticate($key){
    $session = new SESSION();
    if ($session->validate_basic_token($key, $_POST, 'GET')){
      $this->authenticated = true;
      $this->username = $session->username;
      $this->message = $session->response;
      return true;
    }else
      return false;
  }
}
<commit_msg>Auth attempt 5<commit_after><?php

include_once 'session.php';

class WebSocketUser{

  public $socket;
  public $id;
  public $headers = array();
  public $handshake = false;

  public $handlingPartialPacket = false;
  public $partialBuffer = "";

  public $sendingContinuous = false;
  public $partialMessage = "";

  public $hasSentClose = false;

  public $authenticated = false;
  public $username = "";
  public $module = "";
  public $message = "";

  function __construct($id, $socket) {
    $this->id = $id;
    $this->socket = $socket;
  }

  public function authenticate($key){
    $session = new SESSION();
    if ($session->validate_basic_token($key, $_POST, 'GET')){
      $this->authenticated = true;
      $this->username = $session->username;
      $this->message = implode(" ", $session->response);
      return true;
    }else
      return false;
  }
}

{'fraction_non_alphanumeric': 0.14979757085020243, 'fraction_numerical': 0.000578368999421631, 'mean_word_length': 3.424552429667519, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5574927', 'n_tokens_mistral': 550, 'n_tokens_neox': 528, 'n_words': 133}