u2auth 0.2.0__tar.gz → 0.2.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: u2auth
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: U2Auth SDK for Python — TOTP verification, push approvals, and local TOTP helpers
5
5
  Author-email: DollarMates Dev <dev@dollarmates.com>
6
6
  License-Expression: MIT
@@ -125,7 +125,7 @@ enrolment = client.wait_for_link(pairing["code"], user_identifier="user@example.
125
125
 
126
126
  ### `Client(api_key, *, base_url?)`
127
127
 
128
- Sync API client. `base_url` defaults to `https://app.u2secured.io`.
128
+ Sync API client. `base_url` defaults to `https://auth.u2secured.com`.
129
129
 
130
130
  ### `client.verify_totp(secret, code) -> dict`
131
131
 
@@ -103,7 +103,7 @@ enrolment = client.wait_for_link(pairing["code"], user_identifier="user@example.
103
103
 
104
104
  ### `Client(api_key, *, base_url?)`
105
105
 
106
- Sync API client. `base_url` defaults to `https://app.u2secured.io`.
106
+ Sync API client. `base_url` defaults to `https://auth.u2secured.com`.
107
107
 
108
108
  ### `client.verify_totp(secret, code) -> dict`
109
109
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "u2auth"
7
- version = "0.2.0"
7
+ version = "0.2.1"
8
8
  description = "U2Auth SDK for Python — TOTP verification, push approvals, and local TOTP helpers"
9
9
  authors = [{ name = "DollarMates Dev", email = "dev@dollarmates.com" }]
10
10
  requires-python = ">=3.9"
@@ -822,3 +822,20 @@ class TestDeleteEnrolment:
822
822
  assert exc.value.code == "ENROLMENT_NOT_FOUND"
823
823
  assert exc.value.status_code == 404
824
824
  srv.stop()
825
+
826
+
827
+ def test_default_base_url_is_the_production_host():
828
+ """The default base URL is a security boundary, not a convenience.
829
+
830
+ A client built without base_url sends the caller's rka_ key to whatever
831
+ this names. It named https://app.u2secured.io through 0.2.0 -- a domain
832
+ nobody had registered, so any stranger could have bought it and collected
833
+ keys from every integration that took the default. No test referenced the
834
+ constant, so nothing noticed.
835
+
836
+ The literal is asserted rather than the constant against itself, which
837
+ would pass whatever the constant said.
838
+ """
839
+ from u2auth.client import _DEFAULT_BASE_URL
840
+
841
+ assert _DEFAULT_BASE_URL == "https://auth.u2secured.com"
@@ -8,7 +8,7 @@ import urllib.request
8
8
  from typing import Any, Dict, Optional
9
9
 
10
10
 
11
- _DEFAULT_BASE_URL = "https://app.u2secured.io"
11
+ _DEFAULT_BASE_URL = "https://auth.u2secured.com"
12
12
 
13
13
 
14
14
  class U2AuthError(Exception):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: u2auth
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: U2Auth SDK for Python — TOTP verification, push approvals, and local TOTP helpers
5
5
  Author-email: DollarMates Dev <dev@dollarmates.com>
6
6
  License-Expression: MIT
@@ -125,7 +125,7 @@ enrolment = client.wait_for_link(pairing["code"], user_identifier="user@example.
125
125
 
126
126
  ### `Client(api_key, *, base_url?)`
127
127
 
128
- Sync API client. `base_url` defaults to `https://app.u2secured.io`.
128
+ Sync API client. `base_url` defaults to `https://auth.u2secured.com`.
129
129
 
130
130
  ### `client.verify_totp(secret, code) -> dict`
131
131
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes