clawdex-mobile 5.1.3-internal.4 → 5.1.3-internal.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawdex-mobile",
3
- "version": "5.1.3-internal.4",
3
+ "version": "5.1.3-internal.5",
4
4
  "description": "Private-network mobile bridge and CLI for Codex and OpenCode",
5
5
  "keywords": [
6
6
  "codex",
@@ -149,7 +149,7 @@ dependencies = [
149
149
 
150
150
  [[package]]
151
151
  name = "codex-rust-bridge"
152
- version = "5.1.3-internal.4"
152
+ version = "5.1.3-internal.5"
153
153
  dependencies = [
154
154
  "axum",
155
155
  "base64",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "codex-rust-bridge"
3
- version = "5.1.3-internal.4"
3
+ version = "5.1.3-internal.5"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
@@ -785,7 +785,9 @@ impl AppState {
785
785
  let Some(service) = &self.github_codespaces_auth else {
786
786
  return false;
787
787
  };
788
- let Some(token) = extract_bearer_token(headers) else {
788
+ let Some(token) =
789
+ extract_auth_token(headers, query_token, self.config.allow_query_token_auth)
790
+ else {
789
791
  return false;
790
792
  };
791
793
 
@@ -793,6 +795,24 @@ impl AppState {
793
795
  }
794
796
  }
795
797
 
798
+ fn extract_auth_token<'a>(
799
+ headers: &'a HeaderMap,
800
+ query_token: Option<&'a str>,
801
+ allow_query_token_auth: bool,
802
+ ) -> Option<&'a str> {
803
+ if let Some(token) = extract_bearer_token(headers) {
804
+ return Some(token);
805
+ }
806
+
807
+ if allow_query_token_auth {
808
+ if let Some(token) = query_token.map(str::trim).filter(|token| !token.is_empty()) {
809
+ return Some(token);
810
+ }
811
+ }
812
+
813
+ None
814
+ }
815
+
796
816
  #[derive(Debug, Clone, Serialize)]
797
817
  #[serde(rename_all = "camelCase")]
798
818
  struct BrowserPreviewSessionResponse {