fulla-oauth2 1.0.0__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 (181) hide show
  1. fulla_oauth2-1.0.0/.gitignore +133 -0
  2. fulla_oauth2-1.0.0/LICENSE +21 -0
  3. fulla_oauth2-1.0.0/PKG-INFO +173 -0
  4. fulla_oauth2-1.0.0/README.md +143 -0
  5. fulla_oauth2-1.0.0/examples/client_credentials_demo.py +53 -0
  6. fulla_oauth2-1.0.0/pyproject.toml +54 -0
  7. fulla_oauth2-1.0.0/src/fulla/__init__.py +52 -0
  8. fulla_oauth2-1.0.0/src/fulla/generated/__init__.py +8 -0
  9. fulla_oauth2-1.0.0/src/fulla/generated/api/__init__.py +1 -0
  10. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/__init__.py +1 -0
  11. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/delete_api_admin_clients_client_id.py +108 -0
  12. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/delete_api_admin_roles_role_id.py +105 -0
  13. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/delete_api_admin_scopes_scope_id.py +105 -0
  14. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/delete_api_admin_tokens_token_prefix.py +108 -0
  15. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/delete_api_admin_users_user_id.py +117 -0
  16. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_clients.py +91 -0
  17. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_clients_client_id.py +108 -0
  18. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_clients_client_id_scopes.py +105 -0
  19. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_dashboard.py +144 -0
  20. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_dashboard_stats.py +136 -0
  21. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_logs.py +88 -0
  22. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_oidc_keys.py +88 -0
  23. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_organizations.py +144 -0
  24. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_organizations_slug.py +167 -0
  25. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_roles.py +136 -0
  26. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_scopes.py +136 -0
  27. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_scopes_resources.py +140 -0
  28. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_tokens.py +88 -0
  29. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_users.py +153 -0
  30. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_users_user_id.py +167 -0
  31. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/get_api_admin_users_user_id_roles.py +167 -0
  32. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/post_api_admin_clients.py +110 -0
  33. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/post_api_admin_clients_client_id_reset_secret.py +108 -0
  34. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/post_api_admin_organizations.py +186 -0
  35. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/post_api_admin_roles.py +114 -0
  36. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/post_api_admin_scopes.py +114 -0
  37. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/post_api_admin_tokens_revoke_by_client.py +91 -0
  38. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/post_api_admin_tokens_revoke_by_user.py +91 -0
  39. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/post_api_admin_users.py +118 -0
  40. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/post_api_admin_users_user_id_enable.py +105 -0
  41. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/put_api_admin_clients_client_id.py +126 -0
  42. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/put_api_admin_clients_client_id_scopes.py +108 -0
  43. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/put_api_admin_roles_role_id.py +121 -0
  44. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/put_api_admin_scopes_scope_id.py +121 -0
  45. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/put_api_admin_users_user_id.py +131 -0
  46. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/put_api_admin_users_user_id_disable.py +111 -0
  47. fulla_oauth2-1.0.0/src/fulla/generated/api/admin/put_api_admin_users_user_id_roles.py +124 -0
  48. fulla_oauth2-1.0.0/src/fulla/generated/api/external_auth/__init__.py +1 -0
  49. fulla_oauth2-1.0.0/src/fulla/generated/api/external_auth/post_api_github_login.py +180 -0
  50. fulla_oauth2-1.0.0/src/fulla/generated/api/external_auth/post_api_google_login.py +115 -0
  51. fulla_oauth2-1.0.0/src/fulla/generated/api/external_auth/post_api_wechat_login.py +115 -0
  52. fulla_oauth2-1.0.0/src/fulla/generated/api/mfa/__init__.py +1 -0
  53. fulla_oauth2-1.0.0/src/fulla/generated/api/mfa/post_api_me_mfa_disable.py +175 -0
  54. fulla_oauth2-1.0.0/src/fulla/generated/api/mfa/post_api_me_mfa_setup.py +179 -0
  55. fulla_oauth2-1.0.0/src/fulla/generated/api/mfa/post_api_me_mfa_verify.py +188 -0
  56. fulla_oauth2-1.0.0/src/fulla/generated/api/mfa/post_oauth2_mfa_verify.py +207 -0
  57. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/__init__.py +1 -0
  58. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/get_oauth2_authorize.py +191 -0
  59. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/get_oauth2_end_session.py +236 -0
  60. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/get_oauth2_userinfo.py +163 -0
  61. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/get_well_known_oauth_authorization_server.py +140 -0
  62. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/post_oauth2_consent.py +154 -0
  63. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/post_oauth2_device_approve.py +187 -0
  64. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/post_oauth2_device_authorization.py +195 -0
  65. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/post_oauth2_end_session.py +216 -0
  66. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/post_oauth2_introspect.py +186 -0
  67. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/post_oauth2_login.py +229 -0
  68. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/post_oauth2_logout.py +179 -0
  69. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/post_oauth2_register.py +91 -0
  70. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/post_oauth2_revoke.py +196 -0
  71. fulla_oauth2-1.0.0/src/fulla/generated/api/o_auth_2/post_oauth2_token.py +231 -0
  72. fulla_oauth2-1.0.0/src/fulla/generated/api/open_id_connect/__init__.py +1 -0
  73. fulla_oauth2-1.0.0/src/fulla/generated/api/open_id_connect/get_well_known_jwks_json.py +132 -0
  74. fulla_oauth2-1.0.0/src/fulla/generated/api/open_id_connect/get_well_known_openid_configuration.py +132 -0
  75. fulla_oauth2-1.0.0/src/fulla/generated/api/system/__init__.py +1 -0
  76. fulla_oauth2-1.0.0/src/fulla/generated/api/system/get_health.py +137 -0
  77. fulla_oauth2-1.0.0/src/fulla/generated/api/system/get_health_live.py +132 -0
  78. fulla_oauth2-1.0.0/src/fulla/generated/api/system/get_health_ready.py +137 -0
  79. fulla_oauth2-1.0.0/src/fulla/generated/api/user/__init__.py +1 -0
  80. fulla_oauth2-1.0.0/src/fulla/generated/api/user/post_api_register.py +128 -0
  81. fulla_oauth2-1.0.0/src/fulla/generated/api/user_profile/__init__.py +1 -0
  82. fulla_oauth2-1.0.0/src/fulla/generated/api/user_profile/delete_api_me.py +91 -0
  83. fulla_oauth2-1.0.0/src/fulla/generated/api/user_profile/delete_api_me_authorized_apps_client_id.py +108 -0
  84. fulla_oauth2-1.0.0/src/fulla/generated/api/user_profile/delete_api_me_social_links_provider.py +206 -0
  85. fulla_oauth2-1.0.0/src/fulla/generated/api/user_profile/get_api_me.py +94 -0
  86. fulla_oauth2-1.0.0/src/fulla/generated/api/user_profile/get_api_me_authorized_apps.py +88 -0
  87. fulla_oauth2-1.0.0/src/fulla/generated/api/user_profile/get_api_me_social_links.py +160 -0
  88. fulla_oauth2-1.0.0/src/fulla/generated/api/user_profile/post_api_me_social_links_provider.py +228 -0
  89. fulla_oauth2-1.0.0/src/fulla/generated/api/user_profile/put_api_me_password.py +94 -0
  90. fulla_oauth2-1.0.0/src/fulla/generated/api/user_verification/__init__.py +1 -0
  91. fulla_oauth2-1.0.0/src/fulla/generated/api/user_verification/get_api_verify_email.py +88 -0
  92. fulla_oauth2-1.0.0/src/fulla/generated/api/user_verification/post_api_password_reset_confirm.py +88 -0
  93. fulla_oauth2-1.0.0/src/fulla/generated/api/user_verification/post_api_password_reset_request.py +88 -0
  94. fulla_oauth2-1.0.0/src/fulla/generated/api/user_verification/post_api_verify_email_resend.py +94 -0
  95. fulla_oauth2-1.0.0/src/fulla/generated/api/web_authn/__init__.py +1 -0
  96. fulla_oauth2-1.0.0/src/fulla/generated/api/web_authn/get_api_me_webauthn_credentials.py +88 -0
  97. fulla_oauth2-1.0.0/src/fulla/generated/api/web_authn/post_api_me_webauthn_register_begin.py +88 -0
  98. fulla_oauth2-1.0.0/src/fulla/generated/api/web_authn/post_api_me_webauthn_register_finish.py +91 -0
  99. fulla_oauth2-1.0.0/src/fulla/generated/api/web_authn/post_oauth2_webauthn_authenticate_begin.py +85 -0
  100. fulla_oauth2-1.0.0/src/fulla/generated/api/web_authn/post_oauth2_webauthn_authenticate_finish.py +91 -0
  101. fulla_oauth2-1.0.0/src/fulla/generated/client.py +268 -0
  102. fulla_oauth2-1.0.0/src/fulla/generated/errors.py +16 -0
  103. fulla_oauth2-1.0.0/src/fulla/generated/models/__init__.py +147 -0
  104. fulla_oauth2-1.0.0/src/fulla/generated/models/delete_api_me_social_links_provider_provider.py +10 -0
  105. fulla_oauth2-1.0.0/src/fulla/generated/models/device_authorization_response.py +94 -0
  106. fulla_oauth2-1.0.0/src/fulla/generated/models/error.py +109 -0
  107. fulla_oauth2-1.0.0/src/fulla/generated/models/error_envelope.py +70 -0
  108. fulla_oauth2-1.0.0/src/fulla/generated/models/get_api_admin_dashboard_response_200.py +70 -0
  109. fulla_oauth2-1.0.0/src/fulla/generated/models/get_api_admin_dashboard_stats_response_200.py +106 -0
  110. fulla_oauth2-1.0.0/src/fulla/generated/models/get_api_admin_organizations_response_200.py +88 -0
  111. fulla_oauth2-1.0.0/src/fulla/generated/models/get_api_admin_roles_response_200.py +97 -0
  112. fulla_oauth2-1.0.0/src/fulla/generated/models/get_api_admin_roles_response_200_roles_item.py +97 -0
  113. fulla_oauth2-1.0.0/src/fulla/generated/models/get_api_admin_scopes_resources_response_200.py +83 -0
  114. fulla_oauth2-1.0.0/src/fulla/generated/models/get_api_admin_scopes_resources_response_200_resources_item.py +92 -0
  115. fulla_oauth2-1.0.0/src/fulla/generated/models/get_api_admin_scopes_response_200.py +97 -0
  116. fulla_oauth2-1.0.0/src/fulla/generated/models/get_api_admin_scopes_response_200_scopes_item.py +106 -0
  117. fulla_oauth2-1.0.0/src/fulla/generated/models/get_api_admin_users_locked.py +9 -0
  118. fulla_oauth2-1.0.0/src/fulla/generated/models/get_api_admin_users_user_id_response_200.py +173 -0
  119. fulla_oauth2-1.0.0/src/fulla/generated/models/get_api_admin_users_user_id_roles_response_200.py +92 -0
  120. fulla_oauth2-1.0.0/src/fulla/generated/models/get_api_admin_users_user_id_roles_response_200_roles_item.py +79 -0
  121. fulla_oauth2-1.0.0/src/fulla/generated/models/health_status.py +109 -0
  122. fulla_oauth2-1.0.0/src/fulla/generated/models/health_status_status.py +10 -0
  123. fulla_oauth2-1.0.0/src/fulla/generated/models/introspection_response.py +146 -0
  124. fulla_oauth2-1.0.0/src/fulla/generated/models/jwk_set.py +76 -0
  125. fulla_oauth2-1.0.0/src/fulla/generated/models/jwk_set_keys_item.py +119 -0
  126. fulla_oauth2-1.0.0/src/fulla/generated/models/login_request.py +146 -0
  127. fulla_oauth2-1.0.0/src/fulla/generated/models/login_success_response.py +70 -0
  128. fulla_oauth2-1.0.0/src/fulla/generated/models/message_response.py +61 -0
  129. fulla_oauth2-1.0.0/src/fulla/generated/models/mfa_required_response.py +81 -0
  130. fulla_oauth2-1.0.0/src/fulla/generated/models/mfa_verify_request.py +116 -0
  131. fulla_oauth2-1.0.0/src/fulla/generated/models/o_auth_2_error.py +87 -0
  132. fulla_oauth2-1.0.0/src/fulla/generated/models/o_auth_2_error_error.py +22 -0
  133. fulla_oauth2-1.0.0/src/fulla/generated/models/o_auth_authorization_server_metadata.py +246 -0
  134. fulla_oauth2-1.0.0/src/fulla/generated/models/open_id_configuration.py +271 -0
  135. fulla_oauth2-1.0.0/src/fulla/generated/models/organization.py +106 -0
  136. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_admin_clients_body.py +118 -0
  137. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_admin_clients_body_client_type.py +9 -0
  138. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_admin_organizations_body.py +98 -0
  139. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_admin_organizations_response_200.py +115 -0
  140. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_admin_roles_body.py +72 -0
  141. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_admin_scopes_body.py +99 -0
  142. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_admin_users_body.py +129 -0
  143. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_github_login_response_200.py +97 -0
  144. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_me_mfa_disable_body.py +47 -0
  145. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_me_mfa_setup_body.py +47 -0
  146. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_me_mfa_setup_response_200.py +80 -0
  147. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_me_mfa_verify_data_body.py +61 -0
  148. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_me_mfa_verify_json_body.py +61 -0
  149. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_me_mfa_verify_response_200.py +81 -0
  150. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_me_social_links_provider_body.py +61 -0
  151. fulla_oauth2-1.0.0/src/fulla/generated/models/post_api_me_social_links_provider_provider.py +10 -0
  152. fulla_oauth2-1.0.0/src/fulla/generated/models/post_oauth_2_consent_action.py +9 -0
  153. fulla_oauth2-1.0.0/src/fulla/generated/models/post_oauth_2_device_approve_body.py +69 -0
  154. fulla_oauth2-1.0.0/src/fulla/generated/models/post_oauth_2_device_approve_response_200.py +70 -0
  155. fulla_oauth2-1.0.0/src/fulla/generated/models/post_oauth_2_device_authorization_body.py +81 -0
  156. fulla_oauth2-1.0.0/src/fulla/generated/models/post_oauth_2_introspect_body.py +90 -0
  157. fulla_oauth2-1.0.0/src/fulla/generated/models/post_oauth_2_logout_body.py +47 -0
  158. fulla_oauth2-1.0.0/src/fulla/generated/models/post_oauth_2_mfa_verify_response_200.py +135 -0
  159. fulla_oauth2-1.0.0/src/fulla/generated/models/post_oauth_2_revoke_body.py +90 -0
  160. fulla_oauth2-1.0.0/src/fulla/generated/models/put_api_admin_clients_client_id_body.py +89 -0
  161. fulla_oauth2-1.0.0/src/fulla/generated/models/put_api_admin_roles_role_id_body.py +61 -0
  162. fulla_oauth2-1.0.0/src/fulla/generated/models/put_api_admin_scopes_scope_id_body.py +88 -0
  163. fulla_oauth2-1.0.0/src/fulla/generated/models/put_api_admin_users_user_id_body.py +117 -0
  164. fulla_oauth2-1.0.0/src/fulla/generated/models/put_api_admin_users_user_id_roles_body.py +61 -0
  165. fulla_oauth2-1.0.0/src/fulla/generated/models/social_link_entry.py +82 -0
  166. fulla_oauth2-1.0.0/src/fulla/generated/models/social_link_entry_provider.py +10 -0
  167. fulla_oauth2-1.0.0/src/fulla/generated/models/social_link_result.py +82 -0
  168. fulla_oauth2-1.0.0/src/fulla/generated/models/social_link_result_provider.py +10 -0
  169. fulla_oauth2-1.0.0/src/fulla/generated/models/social_links_list.py +83 -0
  170. fulla_oauth2-1.0.0/src/fulla/generated/models/token_request.py +143 -0
  171. fulla_oauth2-1.0.0/src/fulla/generated/models/token_request_grant_type.py +11 -0
  172. fulla_oauth2-1.0.0/src/fulla/generated/models/token_response.py +121 -0
  173. fulla_oauth2-1.0.0/src/fulla/generated/models/user_info_response.py +110 -0
  174. fulla_oauth2-1.0.0/src/fulla/generated/py.typed +1 -0
  175. fulla_oauth2-1.0.0/src/fulla/generated/types.py +54 -0
  176. fulla_oauth2-1.0.0/src/fulla/m2m.py +419 -0
  177. fulla_oauth2-1.0.0/src/fulla/oauth.py +218 -0
  178. fulla_oauth2-1.0.0/tests/conftest.py +125 -0
  179. fulla_oauth2-1.0.0/tests/integration/test_against_server.py +89 -0
  180. fulla_oauth2-1.0.0/tests/test_m2m_auth.py +213 -0
  181. fulla_oauth2-1.0.0/tests/test_oauth_pkce.py +128 -0
@@ -0,0 +1,133 @@
1
+
2
+ # Agent Skill Reports
3
+ *.log
4
+ *_report.md
5
+ fix_run.md
6
+ review_config_verification.md
7
+ __pycache__/
8
+
9
+ # Git Worktrees
10
+ .worktrees/
11
+ worktrees/
12
+
13
+ # IDE & Envs
14
+ # .vscode/ - 部分配置文件需要提交到版本控制
15
+ .vscode/settings.local.json
16
+ .vscode/tasks.local.json
17
+ .vscode/launch.local.json
18
+ .vscode/.intellicache/
19
+ .venv/
20
+ **/.venv/
21
+
22
+ # Claude Code Settings
23
+ .claude/settings.local.json
24
+
25
+ # Sensitive Data
26
+ cookies.txt
27
+
28
+ # Sensitive Configuration Files
29
+ .env
30
+ .env.local
31
+
32
+ # Benchmark generated token pools (contain raw token secrets)
33
+ benchmarks/fulla/lib/generated/
34
+ .env.*.local
35
+ .env.docker
36
+ .mcp.json
37
+ *.pem
38
+ *.key
39
+ *.cert
40
+ *.crt
41
+ secrets/
42
+ credentials/
43
+ # Frontend runtime config with production credentials
44
+ frontends/user/.env
45
+ frontends/user/public/config.json
46
+ # Deploy secrets
47
+ deploy/nginx/ssl/*.pem
48
+ deploy/keys/*.pem
49
+
50
+ # Release Files
51
+ Release_v1.0.0.zip
52
+
53
+ # Temporary Outputs
54
+ tmp_output/
55
+
56
+ # Test Runtime Files
57
+ test_config_env_runtime.json
58
+ test-results/
59
+ **/test-results/
60
+ **/playwright-report/
61
+ **/blob-report/
62
+ **/playwright/.cache/
63
+ *_test_logs/
64
+ *.log.files/
65
+
66
+ # Runtime directories (created by Drogon at startup)
67
+ **/logs/
68
+ # Exception: admin console source directory named "logs" (page component)
69
+ !OAuth2Admin/src/pages/logs/
70
+ !OAuth2Admin/src/pages/logs/**
71
+ **/uploads/
72
+
73
+ # Bug Fix Reports - local documentation only
74
+ reports/
75
+
76
+ # Build artifacts
77
+ build/
78
+ build-*/
79
+
80
+ # Code coverage reports (gcov output via gcovr; local-only, never tracked)
81
+ coverage-report/
82
+ coverage-summary.txt
83
+ coverage-summary.json
84
+ CMakeUserPresets.json
85
+ libs/storage-postgres/models_backup/
86
+
87
+ # Cross-project patterns
88
+ **/node_modules/
89
+ **/dist/
90
+ **/__pycache__/
91
+ **/*.pyc
92
+
93
+ # Kiro spec workflow scratch (commit messages, probes, etc.). Spec files
94
+ # under .kiro/specs/ remain tracked.
95
+ .kiro/tmp/
96
+
97
+ build_log.txt
98
+ ctest_output.txt
99
+
100
+ test_admin.txt
101
+ test_oauth2.txt
102
+ build_p12.txt
103
+
104
+ # Graphify knowledge graph (generated artifacts, local only)
105
+ graphify-out/
106
+
107
+ # Codegraph local index & runtime state
108
+ .codegraph/
109
+
110
+ # Superpowers SDD scratch (task briefs, reports, progress ledger)
111
+ .superpowers/
112
+
113
+ .playwright-mcp/
114
+ .mimosa/
115
+
116
+ # Client SDKs (clients/) local artifacts
117
+ **/.pytest_cache/
118
+ **/.ruff_cache/
119
+ **/*.egg-info/
120
+ clients/python/.venv/
121
+
122
+ # ZCode per-session scratch (plans/tmp — same convention as .kiro/tmp/)
123
+ .zcode/tmp/
124
+ .zcode/plans/
125
+
126
+ # AI-tool workspaces (local-only; .claude/ stays tracked as the single source
127
+ # of truth for rules/skills — see docs/branding/repo-professionalization-audit.md)
128
+ .qoder/
129
+ .codebuddy/
130
+ .kiro/
131
+ .zcode/
132
+ .workbuddy/
133
+ frontends/user/scratch/scratch-output/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Luca
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,173 @@
1
+ Metadata-Version: 2.5
2
+ Name: fulla-oauth2
3
+ Version: 1.0.0
4
+ Summary: Python client SDK for Fulla, the embeddable C++ OAuth2/OIDC authorization server
5
+ Project-URL: Homepage, https://github.com/voidvec/fulla
6
+ Project-URL: Documentation, https://github.com/voidvec/fulla/tree/master/clients/python
7
+ Project-URL: Repository, https://github.com/voidvec/fulla
8
+ Author: Fulla contributors
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: authorization,client,fulla,oauth2,oidc,openid-connect,sdk
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Internet :: WWW/HTTP
20
+ Classifier: Topic :: Security
21
+ Classifier: Typing :: Typed
22
+ Requires-Python: >=3.11
23
+ Requires-Dist: attrs>=22.2.0
24
+ Requires-Dist: httpx<0.29.0,>=0.23.1
25
+ Provides-Extra: dev
26
+ Requires-Dist: build>=1.2; extra == 'dev'
27
+ Requires-Dist: pytest-asyncio>=0.25; extra == 'dev'
28
+ Requires-Dist: pytest>=8.0; extra == 'dev'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # Fulla Python Client
32
+
33
+ Typed Python SDK for [Fulla](https://github.com/voidvec/fulla) — the embeddable
34
+ C++ OAuth2/OIDC authorization server.
35
+
36
+ - **Distribution name:** `fulla-oauth2` (the shorter `fulla` name on PyPI belongs to an
37
+ unrelated project)
38
+ - **Import name:** `fulla`
39
+ - **API surface:** generated from the server's single-source OpenAPI spec
40
+ (`apps/server/openapi.yaml`) with [openapi-python-client](https://github.com/openapi-generators/openapi-python-client)
41
+ 0.29.0 — 78 operations, fully typed (`py.typed`), `attrs`-based models over `httpx`
42
+ - **Auth layer:** handwritten (token lifecycle is too sensitive to template — see the
43
+ [design doc](../../docs/productization-evolution/in-progress/client-sdk-facility-design.md))
44
+
45
+ ```bash
46
+ pip install fulla-oauth2
47
+ ```
48
+
49
+ > Published to PyPI since v1.3.0 (release pipeline's `sdk-python` job). Prefer the released wheel; a
50
+ > checkout install (`pip install clients/python`) still works for development.
51
+
52
+ ## Quickstart: machine-to-machine (client_credentials)
53
+
54
+ ```python
55
+ from fulla import m2m_client
56
+ from fulla.generated.api.o_auth_2 import post_oauth2_introspect
57
+ from fulla.generated.models.post_oauth_2_introspect_body import PostOauth2IntrospectBody
58
+
59
+ client = m2m_client(
60
+ "http://localhost:5555",
61
+ client_id="backend-svc",
62
+ client_secret="…",
63
+ scopes=["tokens:read"],
64
+ )
65
+
66
+ # Every request carries a valid Bearer token: fetched lazily, cached,
67
+ # refreshed 30 s before expiry, force-refreshed once on a 401.
68
+ result = post_oauth2_introspect.sync(
69
+ client=client, body=PostOauth2IntrospectBody(token=some_access_token)
70
+ )
71
+ print(result.active)
72
+
73
+ # When done: closes BOTH the API client and the auth layer's token pool
74
+ # (closing the generated client alone leaks the token connection pool).
75
+ from fulla import close_m2m_client
76
+ close_m2m_client(client)
77
+ ```
78
+
79
+ Async is symmetric:
80
+
81
+ ```python
82
+ from fulla import async_m2m_client
83
+
84
+ client = async_m2m_client("http://localhost:5555", "backend-svc", "…", scopes=["tokens:read"])
85
+ result = await post_oauth2_introspect.asyncio(client=client, body=body)
86
+ ```
87
+
88
+ One-shot token fetch (scripts, benchmarks):
89
+
90
+ ```python
91
+ from fulla import fetch_client_credentials_token
92
+
93
+ token, expires_in = fetch_client_credentials_token(
94
+ "http://localhost:5555", "backend-svc", "…", ["tokens:read"]
95
+ )
96
+ ```
97
+
98
+ ## Introspect / revoke (client Basic authentication)
99
+
100
+ `/oauth2/introspect` and `/oauth2/revoke` authenticate the *calling client*, not a user bearer
101
+ token (RFC 7662 §2.1). Use a client whose every request carries HTTP Basic — confidential
102
+ clients must use Basic; the server rejects credentials in the body (F-017):
103
+
104
+ ```python
105
+ from fulla import basic_auth_client
106
+
107
+ client = basic_auth_client("http://localhost:5555", "backend-svc", "…")
108
+ result = post_oauth2_introspect.sync(client=client, body=PostOauth2IntrospectBody(token=tok))
109
+ ```
110
+
111
+ ## Authorization-code flow (web apps, with PKCE)
112
+
113
+ ```python
114
+ from fulla import AuthorizationCodeFlow, PkcePair
115
+
116
+ flow = AuthorizationCodeFlow(
117
+ "http://localhost:5555", "my-client", "my-secret",
118
+ redirect_uri="https://my.app/callback", scopes=["openid", "profile"],
119
+ )
120
+ pkce = PkcePair.generate()
121
+ authorize_url = flow.build_authorize_url(state=session_csrf, pkce=pkce)
122
+ # → send the user's browser to authorize_url; Fulla redirects back with ?code=…&state=…
123
+ # → VERIFY state, then:
124
+ tokens = flow.exchange_code(code, pkce.verifier)
125
+ # … later; Fulla rotates refresh tokens on every use (V008):
126
+ tokens = flow.refresh(tokens.refresh_token)
127
+ ```
128
+
129
+ ## Generated API modules
130
+
131
+ Everything under `fulla.generated` is the typed surface of the whole server API:
132
+
133
+ ```python
134
+ from fulla.generated.api.open_id_connect import get_well_known_openid_configuration
135
+ from fulla.generated.api.o_auth_2 import get_oauth2_userinfo, post_oauth2_token
136
+ from fulla.generated.models.token_request import TokenRequest
137
+ ```
138
+
139
+ Each endpoint module offers `sync`, `sync_detailed`, `asyncio`, `asyncio_detailed`. The
140
+ `*_detailed` variants return status code + raw response alongside the parsed model.
141
+
142
+ ## Development
143
+
144
+ ```bash
145
+ cd clients/python
146
+ pip install -e ".[dev]"
147
+ pytest # unit tests (in-process MockTransport, no server needed)
148
+
149
+ # integration tests (needs a running full stack, see tests/integration/)
150
+ FULLA_BASE_URL=http://127.0.0.1:5555 pytest tests/integration
151
+ ```
152
+
153
+ Regenerating the committed `src/fulla/generated/` tree after an `openapi.yaml` change:
154
+
155
+ ```bash
156
+ pip install openapi-python-client==0.29.0
157
+ python tools/clients/regen_clients.py # from the repo root
158
+ ```
159
+
160
+ CI (`.github/workflows/clients-sdk.yml`) re-generates and diffs on every PR touching
161
+ `clients/**` or the spec — committed generated code can never go stale.
162
+
163
+ ## Versioning
164
+
165
+ The package version is locked to the server's `cmake/Version.cmake` (enforced by
166
+ `tools/clients/regen_clients.py --version-only` at release time). Breaking HTTP API changes
167
+ require a major bump on both sides (guarded by the `openapi-governance` oasdiff workflow).
168
+
169
+ ## Local network note
170
+
171
+ If `go`/module proxies are unreachable from your network, the Go generator download mentioned
172
+ in the regen docs needs a GOPROXY mirror (e.g. `GOPROXY=https://goproxy.cn,direct`). This only
173
+ affects regenerating `clients/go` — installing and using this Python package is unaffected.
@@ -0,0 +1,143 @@
1
+ # Fulla Python Client
2
+
3
+ Typed Python SDK for [Fulla](https://github.com/voidvec/fulla) — the embeddable
4
+ C++ OAuth2/OIDC authorization server.
5
+
6
+ - **Distribution name:** `fulla-oauth2` (the shorter `fulla` name on PyPI belongs to an
7
+ unrelated project)
8
+ - **Import name:** `fulla`
9
+ - **API surface:** generated from the server's single-source OpenAPI spec
10
+ (`apps/server/openapi.yaml`) with [openapi-python-client](https://github.com/openapi-generators/openapi-python-client)
11
+ 0.29.0 — 78 operations, fully typed (`py.typed`), `attrs`-based models over `httpx`
12
+ - **Auth layer:** handwritten (token lifecycle is too sensitive to template — see the
13
+ [design doc](../../docs/productization-evolution/in-progress/client-sdk-facility-design.md))
14
+
15
+ ```bash
16
+ pip install fulla-oauth2
17
+ ```
18
+
19
+ > Published to PyPI since v1.3.0 (release pipeline's `sdk-python` job). Prefer the released wheel; a
20
+ > checkout install (`pip install clients/python`) still works for development.
21
+
22
+ ## Quickstart: machine-to-machine (client_credentials)
23
+
24
+ ```python
25
+ from fulla import m2m_client
26
+ from fulla.generated.api.o_auth_2 import post_oauth2_introspect
27
+ from fulla.generated.models.post_oauth_2_introspect_body import PostOauth2IntrospectBody
28
+
29
+ client = m2m_client(
30
+ "http://localhost:5555",
31
+ client_id="backend-svc",
32
+ client_secret="…",
33
+ scopes=["tokens:read"],
34
+ )
35
+
36
+ # Every request carries a valid Bearer token: fetched lazily, cached,
37
+ # refreshed 30 s before expiry, force-refreshed once on a 401.
38
+ result = post_oauth2_introspect.sync(
39
+ client=client, body=PostOauth2IntrospectBody(token=some_access_token)
40
+ )
41
+ print(result.active)
42
+
43
+ # When done: closes BOTH the API client and the auth layer's token pool
44
+ # (closing the generated client alone leaks the token connection pool).
45
+ from fulla import close_m2m_client
46
+ close_m2m_client(client)
47
+ ```
48
+
49
+ Async is symmetric:
50
+
51
+ ```python
52
+ from fulla import async_m2m_client
53
+
54
+ client = async_m2m_client("http://localhost:5555", "backend-svc", "…", scopes=["tokens:read"])
55
+ result = await post_oauth2_introspect.asyncio(client=client, body=body)
56
+ ```
57
+
58
+ One-shot token fetch (scripts, benchmarks):
59
+
60
+ ```python
61
+ from fulla import fetch_client_credentials_token
62
+
63
+ token, expires_in = fetch_client_credentials_token(
64
+ "http://localhost:5555", "backend-svc", "…", ["tokens:read"]
65
+ )
66
+ ```
67
+
68
+ ## Introspect / revoke (client Basic authentication)
69
+
70
+ `/oauth2/introspect` and `/oauth2/revoke` authenticate the *calling client*, not a user bearer
71
+ token (RFC 7662 §2.1). Use a client whose every request carries HTTP Basic — confidential
72
+ clients must use Basic; the server rejects credentials in the body (F-017):
73
+
74
+ ```python
75
+ from fulla import basic_auth_client
76
+
77
+ client = basic_auth_client("http://localhost:5555", "backend-svc", "…")
78
+ result = post_oauth2_introspect.sync(client=client, body=PostOauth2IntrospectBody(token=tok))
79
+ ```
80
+
81
+ ## Authorization-code flow (web apps, with PKCE)
82
+
83
+ ```python
84
+ from fulla import AuthorizationCodeFlow, PkcePair
85
+
86
+ flow = AuthorizationCodeFlow(
87
+ "http://localhost:5555", "my-client", "my-secret",
88
+ redirect_uri="https://my.app/callback", scopes=["openid", "profile"],
89
+ )
90
+ pkce = PkcePair.generate()
91
+ authorize_url = flow.build_authorize_url(state=session_csrf, pkce=pkce)
92
+ # → send the user's browser to authorize_url; Fulla redirects back with ?code=…&state=…
93
+ # → VERIFY state, then:
94
+ tokens = flow.exchange_code(code, pkce.verifier)
95
+ # … later; Fulla rotates refresh tokens on every use (V008):
96
+ tokens = flow.refresh(tokens.refresh_token)
97
+ ```
98
+
99
+ ## Generated API modules
100
+
101
+ Everything under `fulla.generated` is the typed surface of the whole server API:
102
+
103
+ ```python
104
+ from fulla.generated.api.open_id_connect import get_well_known_openid_configuration
105
+ from fulla.generated.api.o_auth_2 import get_oauth2_userinfo, post_oauth2_token
106
+ from fulla.generated.models.token_request import TokenRequest
107
+ ```
108
+
109
+ Each endpoint module offers `sync`, `sync_detailed`, `asyncio`, `asyncio_detailed`. The
110
+ `*_detailed` variants return status code + raw response alongside the parsed model.
111
+
112
+ ## Development
113
+
114
+ ```bash
115
+ cd clients/python
116
+ pip install -e ".[dev]"
117
+ pytest # unit tests (in-process MockTransport, no server needed)
118
+
119
+ # integration tests (needs a running full stack, see tests/integration/)
120
+ FULLA_BASE_URL=http://127.0.0.1:5555 pytest tests/integration
121
+ ```
122
+
123
+ Regenerating the committed `src/fulla/generated/` tree after an `openapi.yaml` change:
124
+
125
+ ```bash
126
+ pip install openapi-python-client==0.29.0
127
+ python tools/clients/regen_clients.py # from the repo root
128
+ ```
129
+
130
+ CI (`.github/workflows/clients-sdk.yml`) re-generates and diffs on every PR touching
131
+ `clients/**` or the spec — committed generated code can never go stale.
132
+
133
+ ## Versioning
134
+
135
+ The package version is locked to the server's `cmake/Version.cmake` (enforced by
136
+ `tools/clients/regen_clients.py --version-only` at release time). Breaking HTTP API changes
137
+ require a major bump on both sides (guarded by the `openapi-governance` oasdiff workflow).
138
+
139
+ ## Local network note
140
+
141
+ If `go`/module proxies are unreachable from your network, the Go generator download mentioned
142
+ in the regen docs needs a GOPROXY mirror (e.g. `GOPROXY=https://goproxy.cn,direct`). This only
143
+ affects regenerating `clients/go` — installing and using this Python package is unaffected.
@@ -0,0 +1,53 @@
1
+ """End-to-end demo: client_credentials against a running Fulla server.
2
+
3
+ Usage:
4
+ python examples/client_credentials_demo.py [base_url] [client_id] [client_secret]
5
+
6
+ Defaults match the development seed (apps/server/seed/dev_backend_client.sql):
7
+ backend-svc / test-secret on http://127.0.0.1:5555. Start the full stack first
8
+ (see the repo README); this script is the Python analogue of benchmark
9
+ scenario S2 (client_credentials token flow) plus introspection.
10
+
11
+ Exit code 0 = all steps passed; non-zero = the first failure.
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ import os
17
+ import sys
18
+ from pathlib import Path
19
+
20
+ sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "src"))
21
+
22
+ from fulla import basic_auth_client, fetch_client_credentials_token # noqa: E402
23
+ from fulla.generated.api.o_auth_2 import post_oauth2_introspect # noqa: E402
24
+ from fulla.generated.models.post_oauth_2_introspect_body import ( # noqa: E402
25
+ PostOauth2IntrospectBody,
26
+ )
27
+
28
+
29
+ def main() -> int:
30
+ base_url = sys.argv[1] if len(sys.argv) > 1 else os.environ.get("FULLA_BASE_URL", "http://127.0.0.1:5555")
31
+ client_id = sys.argv[2] if len(sys.argv) > 2 else os.environ.get("FULLA_CLIENT_ID", "backend-svc")
32
+ client_secret = sys.argv[3] if len(sys.argv) > 3 else os.environ.get("FULLA_CLIENT_SECRET", "test-secret")
33
+
34
+ print(f"[demo] fetching client_credentials token from {base_url} as {client_id}")
35
+ access_token, expires_in = fetch_client_credentials_token(
36
+ base_url, client_id, client_secret, ["tokens:read"]
37
+ )
38
+ print(f"[demo] got access_token ({len(access_token)} chars), expires_in={expires_in}s")
39
+
40
+ client = basic_auth_client(base_url, client_id, client_secret)
41
+ result = post_oauth2_introspect.sync(
42
+ client=client, body=PostOauth2IntrospectBody(token=access_token)
43
+ )
44
+ if not result.active:
45
+ print("[demo] FAIL: freshly obtained token introspects as inactive")
46
+ return 1
47
+ print(f"[demo] introspect: active=True client_id={result.client_id} scope={result.scope}")
48
+ print("[demo] OK")
49
+ return 0
50
+
51
+
52
+ if __name__ == "__main__":
53
+ raise SystemExit(main())
@@ -0,0 +1,54 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.26"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "fulla-oauth2"
7
+ version = "1.0.0"
8
+ description = "Python client SDK for Fulla, the embeddable C++ OAuth2/OIDC authorization server"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [{ name = "Fulla contributors" }]
14
+ keywords = ["oauth2", "oidc", "openid-connect", "fulla", "authorization", "client", "sdk"]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Intended Audience :: Developers",
18
+ "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Topic :: Internet :: WWW/HTTP",
24
+ "Topic :: Security",
25
+ "Typing :: Typed",
26
+ ]
27
+ # Dependency floors/ceilings mirror what openapi-python-client 0.29.0 emits
28
+ # for the generated subpackage; generator upgrades go through a dedicated PR.
29
+ dependencies = [
30
+ "httpx>=0.23.1,<0.29.0",
31
+ "attrs>=22.2.0",
32
+ ]
33
+
34
+ [project.urls]
35
+ Homepage = "https://github.com/voidvec/fulla"
36
+ Documentation = "https://github.com/voidvec/fulla/tree/master/clients/python"
37
+ Repository = "https://github.com/voidvec/fulla"
38
+
39
+ [project.optional-dependencies]
40
+ dev = [
41
+ "pytest>=8.0",
42
+ "pytest-asyncio>=0.25",
43
+ "build>=1.2",
44
+ ]
45
+
46
+ [tool.hatch.build.targets.wheel]
47
+ packages = ["src/fulla"]
48
+
49
+ [tool.hatch.build.targets.sdist]
50
+ include = ["src", "tests", "examples", "README.md", "LICENSE"]
51
+
52
+ [tool.pytest.ini_options]
53
+ testpaths = ["tests"]
54
+ asyncio_mode = "auto"
@@ -0,0 +1,52 @@
1
+ """Fulla Python client SDK.
2
+
3
+ Distribution name ``fulla-oauth2`` (the shorter ``fulla`` name on
4
+ PyPI belongs to an unrelated project); import name ``fulla``.
5
+
6
+ Public API:
7
+
8
+ - :func:`m2m_client` / :func:`async_m2m_client` -- ready-to-use generated
9
+ clients with automatic client_credentials token management.
10
+ - :func:`basic_auth_client` -- HTTP-Basic client for introspect/revoke.
11
+ - :func:`fetch_client_credentials_token` -- one-shot token fetch.
12
+ - :class:`AuthorizationCodeFlow` / :class:`PkcePair` -- authorization-code
13
+ grant helpers (URL building, PKCE S256, code exchange, refresh).
14
+ - :mod:`fulla.generated` -- the full typed API surface generated from
15
+ apps/server/openapi.yaml (see its own README for endpoint modules).
16
+ """
17
+
18
+ from .m2m import (
19
+ AsyncClientCredentialsAuth,
20
+ FullaAuthError,
21
+ ClientCredentialsAuth,
22
+ async_m2m_client,
23
+ basic_auth_client,
24
+ close_async_m2m_client,
25
+ close_m2m_client,
26
+ fetch_client_credentials_token,
27
+ m2m_client,
28
+ )
29
+ from .oauth import AuthorizationCodeFlow, PkcePair, create_pkce_challenge
30
+
31
+ try: # pragma: no cover - packaging-time fallback only
32
+ from importlib.metadata import PackageNotFoundError, version
33
+
34
+ __version__ = version("fulla-oauth2")
35
+ except PackageNotFoundError: # pragma: no cover
36
+ __version__ = "0.0.0+unknown"
37
+
38
+ __all__ = [
39
+ "__version__",
40
+ "AsyncClientCredentialsAuth",
41
+ "FullaAuthError",
42
+ "AuthorizationCodeFlow",
43
+ "ClientCredentialsAuth",
44
+ "PkcePair",
45
+ "async_m2m_client",
46
+ "basic_auth_client",
47
+ "close_async_m2m_client",
48
+ "close_m2m_client",
49
+ "create_pkce_challenge",
50
+ "fetch_client_credentials_token",
51
+ "m2m_client",
52
+ ]
@@ -0,0 +1,8 @@
1
+ """A client library for accessing OAuth2 Authorization Server API"""
2
+
3
+ from .client import AuthenticatedClient, Client
4
+
5
+ __all__ = (
6
+ "AuthenticatedClient",
7
+ "Client",
8
+ )
@@ -0,0 +1 @@
1
+ """Contains methods for accessing the API"""
@@ -0,0 +1 @@
1
+ """Contains endpoint functions for accessing the API"""