agentauthlayer 0.1.7__tar.gz → 0.1.8__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 (115) hide show
  1. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/PKG-INFO +1 -1
  2. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/cli.py +23 -1
  3. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/client.py +9 -0
  4. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agentauthlayer.egg-info/PKG-INFO +1 -1
  5. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/pyproject.toml +1 -1
  6. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/MANIFEST.in +0 -0
  7. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/README.md +0 -0
  8. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/__init__.py +0 -0
  9. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/__main__.py +0 -0
  10. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/agents.py +0 -0
  11. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/audit.py +0 -0
  12. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/auth.py +0 -0
  13. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/context.py +0 -0
  14. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/core.py +0 -0
  15. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/credentials.py +0 -0
  16. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/delegation.py +0 -0
  17. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/exceptions.py +0 -0
  18. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/models.py +0 -0
  19. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/policy.py +0 -0
  20. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/policy_service.py +0 -0
  21. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/principals.py +0 -0
  22. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/registry.py +0 -0
  23. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/runtime.py +0 -0
  24. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/server_runtime.py +0 -0
  25. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/session.py +0 -0
  26. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/storage.py +0 -0
  27. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/tokens.py +0 -0
  28. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/users.py +0 -0
  29. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/web_dist/assets/index-BBJ7rinV.css +0 -0
  30. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/web_dist/assets/index-DXUoW2DG.js +0 -0
  31. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/web_dist/favicon.ico +0 -0
  32. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/web_dist/grid.svg +0 -0
  33. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/web_dist/index.html +0 -0
  34. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/web_dist/placeholder.svg +0 -0
  35. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth/web_dist/robots.txt +0 -0
  36. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agent_auth_definitive_guide.pdf +0 -0
  37. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agentauthlayer.egg-info/SOURCES.txt +0 -0
  38. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agentauthlayer.egg-info/dependency_links.txt +0 -0
  39. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agentauthlayer.egg-info/entry_points.txt +0 -0
  40. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agentauthlayer.egg-info/requires.txt +0 -0
  41. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/agentauthlayer.egg-info/top_level.txt +0 -0
  42. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/__init__.py +0 -0
  43. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/api/__init__.py +0 -0
  44. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/api/routes/__init__.py +0 -0
  45. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/api/routes/agents.py +0 -0
  46. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/api/routes/audit.py +0 -0
  47. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/api/routes/auth.py +0 -0
  48. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/api/routes/bootstrap.py +0 -0
  49. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/api/routes/health.py +0 -0
  50. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/api/routes/policy.py +0 -0
  51. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/api/routes/projects.py +0 -0
  52. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/api/routes/tokens.py +0 -0
  53. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/api/routes/users.py +0 -0
  54. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/core/__init__.py +0 -0
  55. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/core/config.py +0 -0
  56. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/core/db.py +0 -0
  57. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/core/errors.py +0 -0
  58. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/core/logging.py +0 -0
  59. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/dependencies/__init__.py +0 -0
  60. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/dependencies/auth.py +0 -0
  61. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/dependencies/security.py +0 -0
  62. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/dependencies/user.py +0 -0
  63. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/domain/__init__.py +0 -0
  64. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/domain/enums.py +0 -0
  65. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/domain/models.py +0 -0
  66. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/main.py +0 -0
  67. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/middleware/__init__.py +0 -0
  68. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/middleware/correlation.py +0 -0
  69. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/__init__.py +0 -0
  70. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/agent_repo.py +0 -0
  71. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/audit_repo.py +0 -0
  72. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/constraint_repo.py +0 -0
  73. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/contracts.py +0 -0
  74. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/delegation_repo.py +0 -0
  75. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/project_repo.py +0 -0
  76. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/role_repo.py +0 -0
  77. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/sqlite_agent_repo.py +0 -0
  78. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/sqlite_audit_repo.py +0 -0
  79. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/sqlite_constraint_repo.py +0 -0
  80. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/sqlite_delegation_repo.py +0 -0
  81. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/sqlite_permission_repo.py +0 -0
  82. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/sqlite_project_repo.py +0 -0
  83. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/sqlite_role_repo.py +0 -0
  84. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/sqlite_token_repo.py +0 -0
  85. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/sqlite_user_repo.py +0 -0
  86. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/token_repo.py +0 -0
  87. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/repositories/user_repo.py +0 -0
  88. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/schemas/__init__.py +0 -0
  89. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/schemas/agent.py +0 -0
  90. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/schemas/audit.py +0 -0
  91. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/schemas/auth.py +0 -0
  92. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/schemas/bootstrap.py +0 -0
  93. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/schemas/device_agents.py +0 -0
  94. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/schemas/policy.py +0 -0
  95. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/schemas/project.py +0 -0
  96. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/schemas/token.py +0 -0
  97. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/schemas/user.py +0 -0
  98. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/services/__init__.py +0 -0
  99. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/services/agent_service.py +0 -0
  100. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/services/audit_service.py +0 -0
  101. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/services/device_agent_service.py +0 -0
  102. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/services/policy_service.py +0 -0
  103. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/services/project_service.py +0 -0
  104. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/services/token_service.py +0 -0
  105. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/auth_app/services/user_service.py +0 -0
  106. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/setup.cfg +0 -0
  107. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/tests/test_agent_auth_library.py +0 -0
  108. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/tests/test_auth_flow.py +0 -0
  109. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/tests/test_core_first_boundary.py +0 -0
  110. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/tests/test_health.py +0 -0
  111. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/tests/test_iam_policy.py +0 -0
  112. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/tests/test_project_flow.py +0 -0
  113. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/tests/test_sqlite_repos.py +0 -0
  114. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/tests/test_storage.py +0 -0
  115. {agentauthlayer-0.1.7 → agentauthlayer-0.1.8}/tests/test_tool_registry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentauthlayer
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: Library-first authentication and authorization SDK for AI agents
5
5
  Author: Vaibhav Ahluwalia
6
6
  License: MIT
@@ -41,6 +41,16 @@ def _bootstrap_status(base_url: str) -> bool | None:
41
41
 
42
42
  def login_command(args) -> int:
43
43
  base_url = (args.base_url or 'http://127.0.0.1:8002').rstrip('/')
44
+
45
+ if args.token:
46
+ save_credentials({
47
+ 'base_url': base_url,
48
+ 'token': args.token,
49
+ 'email': args.email or 'token-auth',
50
+ })
51
+ print(f"Stored API token credentials for {base_url}")
52
+ return 0
53
+
44
54
  setup_status = _bootstrap_status(base_url)
45
55
 
46
56
  if setup_status is False:
@@ -71,6 +81,13 @@ def login_command(args) -> int:
71
81
  'If this is your first time using this deployment, initialize it first in the UI, then try logging in again.',
72
82
  file=sys.stderr,
73
83
  )
84
+ elif response.status_code == 401 and setup_status is True:
85
+ print(
86
+ f"{detail}\n\n"
87
+ 'This local/project deployment is already initialized. Use the same password you set during bootstrap, '
88
+ 'or reset the local state directory if you want a fresh demo environment.',
89
+ file=sys.stderr,
90
+ )
74
91
  else:
75
92
  print(detail, file=sys.stderr)
76
93
  return 1
@@ -92,7 +109,11 @@ def whoami_command(args) -> int:
92
109
  return 1
93
110
  client = AuthAPIClient()
94
111
  me = client.me()
95
- print(json.dumps(me, indent=2))
112
+ print(json.dumps({
113
+ 'auth_source': client.auth_source,
114
+ 'base_url': client.base_url,
115
+ 'user': me,
116
+ }, indent=2))
96
117
  return 0
97
118
 
98
119
 
@@ -198,6 +219,7 @@ def main():
198
219
  login_parser.add_argument('--base-url', default=DEFAULT_BASE_URL)
199
220
  login_parser.add_argument('--email')
200
221
  login_parser.add_argument('--password')
222
+ login_parser.add_argument('--token', help='Store an API token directly instead of using email/password login')
201
223
  login_parser.set_defaults(func=login_command)
202
224
 
203
225
  whoami_parser = subparsers.add_parser('whoami', help='Show the currently stored user context')
@@ -25,6 +25,15 @@ class AuthAPIClient:
25
25
  self.token = token or os.getenv("AGENT_AUTH_TOKEN") or stored.get("token")
26
26
  self.timeout = timeout
27
27
 
28
+ if token:
29
+ self.auth_source = "explicit_token"
30
+ elif os.getenv("AGENT_AUTH_TOKEN"):
31
+ self.auth_source = "env_token"
32
+ elif stored.get("token"):
33
+ self.auth_source = "stored_credentials"
34
+ else:
35
+ self.auth_source = "none"
36
+
28
37
  def _headers(self) -> dict[str, str]:
29
38
  headers = {"Content-Type": "application/json"}
30
39
  if self.token:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentauthlayer
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: Library-first authentication and authorization SDK for AI agents
5
5
  Author: Vaibhav Ahluwalia
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agentauthlayer"
7
- version = "0.1.7"
7
+ version = "0.1.8"
8
8
  description = "Library-first authentication and authorization SDK for AI agents"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes