authsome 0.2.0rc15__tar.gz → 0.2.0rc16__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.
Files changed (129) hide show
  1. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/PKG-INFO +1 -1
  2. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/pyproject.toml +1 -1
  3. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/__init__.py +14 -2
  4. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/models/connection.py +2 -0
  5. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/proxy/server.py +27 -13
  6. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  7. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  8. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/.github/release-please-config.json +0 -0
  9. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/.github/release-please-manifest.json +0 -0
  10. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/.github/workflows/pr-title.yml +0 -0
  11. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/.github/workflows/publish-rc.yml +0 -0
  12. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/.github/workflows/publish.yml +0 -0
  13. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/.github/workflows/release-please.yml +0 -0
  14. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/.github/workflows/test.yml +0 -0
  15. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/.gitignore +0 -0
  16. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/.pre-commit-config.yaml +0 -0
  17. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/AGENTS.md +0 -0
  18. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/CHANGELOG.md +0 -0
  19. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/CLAUDE.md +0 -0
  20. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/CONTRIBUTING.md +0 -0
  21. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/LICENSE +0 -0
  22. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/README.md +0 -0
  23. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/docs/UBIQUITOUS_LANGUAGE.md +0 -0
  24. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/docs/architecture.md +0 -0
  25. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/docs/authsome-design.md +0 -0
  26. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/docs/cli.md +0 -0
  27. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/docs/manual-testing.md +0 -0
  28. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/docs/providers.md +0 -0
  29. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/docs/register-provider.md +0 -0
  30. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/skills/authsome/SKILL.md +0 -0
  31. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/skills/authsome/evals/evals.json +0 -0
  32. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/skills-lock.json +0 -0
  33. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/specs/authsome-v1.md +0 -0
  34. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/__init__.py +0 -0
  35. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/__init__.py +0 -0
  36. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/ahrefs.json +0 -0
  37. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/apollo.json +0 -0
  38. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/ashby.json +0 -0
  39. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/atlassian.json +0 -0
  40. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/beehiiv.json +0 -0
  41. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/brevo.json +0 -0
  42. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/buffer.json +0 -0
  43. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/calendly.json +0 -0
  44. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/clearbit.json +0 -0
  45. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/discord.json +0 -0
  46. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/dub.json +0 -0
  47. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/g2.json +0 -0
  48. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/github.json +0 -0
  49. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/gitlab.json +0 -0
  50. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/google.json +0 -0
  51. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/hubspot.json +0 -0
  52. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/hunter.json +0 -0
  53. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/instantly.json +0 -0
  54. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/intercom.json +0 -0
  55. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/keywords-everywhere.json +0 -0
  56. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/klaviyo-oauth.json +0 -0
  57. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/klaviyo.json +0 -0
  58. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/lemlist.json +0 -0
  59. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/linear.json +0 -0
  60. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/livestorm.json +0 -0
  61. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/mailchimp.json +0 -0
  62. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/mention-me.json +0 -0
  63. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/microsoft.json +0 -0
  64. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/notion.json +0 -0
  65. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/openai.json +0 -0
  66. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/optimizely.json +0 -0
  67. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/postiz.json +0 -0
  68. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/postmark.json +0 -0
  69. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/resend.json +0 -0
  70. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/rewardful.json +0 -0
  71. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/savvycal.json +0 -0
  72. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/semrush.json +0 -0
  73. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/sendgrid.json +0 -0
  74. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/slack.json +0 -0
  75. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/tolt.json +0 -0
  76. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/typeform.json +0 -0
  77. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/wistia.json +0 -0
  78. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/x.json +0 -0
  79. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/bundled_providers/zapier.json +0 -0
  80. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/flows/__init__.py +0 -0
  81. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/flows/api_key.py +0 -0
  82. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/flows/base.py +0 -0
  83. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/flows/bridge.py +0 -0
  84. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/flows/dcr_pkce.py +0 -0
  85. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/flows/device_code.py +0 -0
  86. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/flows/pkce.py +0 -0
  87. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/input_provider.py +0 -0
  88. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/models/__init__.py +0 -0
  89. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/models/config.py +0 -0
  90. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/models/enums.py +0 -0
  91. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/models/profile.py +0 -0
  92. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/models/provider.py +0 -0
  93. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/providers/__init__.py +0 -0
  94. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/auth/providers/registry.py +0 -0
  95. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/bundled_providers/postiz.json +0 -0
  96. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/cli.py +0 -0
  97. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/context.py +0 -0
  98. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/errors.py +0 -0
  99. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/proxy/__init__.py +0 -0
  100. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/proxy/router.py +0 -0
  101. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/proxy/runner.py +0 -0
  102. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/py.typed +0 -0
  103. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/utils.py +0 -0
  104. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/vault/__init__.py +0 -0
  105. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/vault/crypto.py +0 -0
  106. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/src/authsome/vault/storage.py +0 -0
  107. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/suggestions.md +0 -0
  108. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/__init__.py +0 -0
  109. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/auth/__init__.py +0 -0
  110. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/auth/test_auth_layer.py +0 -0
  111. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/auth/test_bridge.py +0 -0
  112. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/auth/test_flows.py +0 -0
  113. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/auth/test_flows_dcr_pkce.py +0 -0
  114. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/auth/test_flows_device_code.py +0 -0
  115. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/auth/test_flows_pkce.py +0 -0
  116. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/auth/test_models.py +0 -0
  117. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/auth/test_registry.py +0 -0
  118. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/auth/test_url_template.py +0 -0
  119. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/common/__init__.py +0 -0
  120. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/common/test_cli.py +0 -0
  121. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/common/test_errors.py +0 -0
  122. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/common/test_logging.py +0 -0
  123. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/common/test_utils.py +0 -0
  124. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/proxy/__init__.py +0 -0
  125. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/proxy/test_proxy.py +0 -0
  126. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/vault/__init__.py +0 -0
  127. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/vault/test_crypto.py +0 -0
  128. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/tests/vault/test_store.py +0 -0
  129. {authsome-0.2.0rc15 → authsome-0.2.0rc16}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: authsome
3
- Version: 0.2.0rc15
3
+ Version: 0.2.0rc16
4
4
  Summary: A portable local authentication library for AI agents and developer tools
5
5
  Author-email: Manoj Bajaj <manojbajaj95@gmail.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "authsome"
7
- version = "0.2.0rc15"
7
+ version = "0.2.0rc16"
8
8
  description = "A portable local authentication library for AI agents and developer tools"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -119,6 +119,8 @@ class AuthLayer:
119
119
  "auth_type": record.auth_type.value,
120
120
  "status": record.status.value,
121
121
  "scopes": record.scopes,
122
+ "base_url": record.base_url,
123
+ "host_url": record.host_url,
122
124
  "expires_at": record.expires_at.isoformat() if record.expires_at else None,
123
125
  }
124
126
  )
@@ -195,6 +197,15 @@ class AuthLayer:
195
197
  default=definition.oauth.base_url,
196
198
  )
197
199
  )
200
+ # Add host_url override if base_url is present
201
+ fields_to_collect.append(
202
+ InputField(
203
+ name="host_url",
204
+ label="API Host URL",
205
+ secret=False,
206
+ default=definition.host_url or "",
207
+ )
208
+ )
198
209
 
199
210
  if flow_type == FlowType.PKCE and not flow_client_id:
200
211
  static_hints.append({"type": "static", "label": "Redirect URL", "value": "http://127.0.0.1:7999/callback"})
@@ -242,6 +253,8 @@ class AuthLayer:
242
253
  if inputs.get("base_url"):
243
254
  flow_base_url = inputs["base_url"]
244
255
  client_record.base_url = flow_base_url
256
+ if inputs.get("host_url"):
257
+ client_record.host_url = inputs["host_url"]
245
258
  if inputs.get("client_id"):
246
259
  flow_client_id = inputs["client_id"]
247
260
  client_record.client_id = flow_client_id
@@ -285,6 +298,7 @@ class AuthLayer:
285
298
  self._save_provider_client_credentials(client_record)
286
299
 
287
300
  result.connection.base_url = flow_base_url
301
+ result.connection.host_url = (client_record.host_url if client_record else None) or resolved_definition.host_url
288
302
  self._save_connection(result.connection)
289
303
  self._update_provider_metadata(provider, connection_name)
290
304
 
@@ -458,8 +472,6 @@ class AuthLayer:
458
472
  config.default_profile = name
459
473
  config_path.write_text(config.model_dump_json(indent=2), encoding="utf-8")
460
474
 
461
- # ── Health check ──────────────────────────────────────────────────────
462
-
463
475
  # ── Internal helpers ──────────────────────────────────────────────────
464
476
 
465
477
  def _load_connection_record(self, record_json: str, key: str) -> ConnectionRecord | None:
@@ -42,6 +42,7 @@ class ConnectionRecord(BaseModel):
42
42
  auth_type: AuthType
43
43
  status: ConnectionStatus
44
44
  base_url: str | None = None
45
+ host_url: str | None = None
45
46
 
46
47
  # OAuth2 fields
47
48
  scopes: list[str] | None = None
@@ -111,6 +112,7 @@ class ProviderClientRecord(BaseModel):
111
112
  client_id: str | None = None
112
113
  client_secret: Annotated[str | None, Sensitive()] = None
113
114
  base_url: str | None = None
115
+ host_url: str | None = None
114
116
  scopes: list[str] | None = None
115
117
  metadata: dict[str, Any] = Field(default_factory=dict)
116
118
 
@@ -25,19 +25,33 @@ def _route(auth: AuthLayer, scheme: str, host: str, port: int, path: str) -> Rou
25
25
  return None
26
26
 
27
27
  matches: list[str] = []
28
- for provider in auth.list_providers():
29
- if not provider.host_url:
30
- continue
31
- if _is_auth_endpoint(provider, host, path):
32
- continue
33
- provider_host = _extract_host(provider.host_url)
34
- if provider_host != host:
35
- continue
36
- try:
37
- auth.get_connection(provider.name, "default")
38
- except Exception:
39
- continue
40
- matches.append(provider.name)
28
+ # Check all active connections for host matches
29
+ for p_group in auth.list_connections():
30
+ p_name = p_group["name"]
31
+ for conn in p_group["connections"]:
32
+ if conn["connection_name"] != "default":
33
+ continue
34
+
35
+ # Connection record carries the resolved host_url
36
+ target_host_url = conn.get("host_url")
37
+ if not target_host_url:
38
+ continue
39
+
40
+ provider_host = _extract_host(target_host_url)
41
+ if provider_host != host:
42
+ continue
43
+
44
+ # Still need definition to check if this is an auth endpoint
45
+ try:
46
+ definition = auth.get_provider(p_name)
47
+ # Resolve templates in OAuth URLs before checking
48
+ resolved = definition.resolve_urls(conn.get("base_url"))
49
+ if _is_auth_endpoint(resolved, host, path):
50
+ continue
51
+ except Exception:
52
+ pass
53
+
54
+ matches.append(p_name)
41
55
 
42
56
  if len(matches) == 0:
43
57
  return None
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes