kinde-python-sdk 2.0.0b3__tar.gz → 2.0.0b5__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.
- kinde_python_sdk-2.0.0b5/MANIFEST.in +14 -0
- {kinde_python_sdk-2.0.0b3/kinde_python_sdk.egg-info → kinde_python_sdk-2.0.0b5}/PKG-INFO +1 -1
- kinde_python_sdk-2.0.0b5/kinde_fastapi/examples/example_app.py +61 -0
- kinde_python_sdk-2.0.0b5/kinde_fastapi/examples/session.py +74 -0
- kinde_python_sdk-2.0.0b5/kinde_fastapi/framework/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_fastapi/framework/fastapi_framework.py +195 -0
- kinde_python_sdk-2.0.0b5/kinde_fastapi/framework/fastapi_framework_factory.py +24 -0
- kinde_python_sdk-2.0.0b5/kinde_fastapi/middleware/framework_middleware.py +32 -0
- kinde_python_sdk-2.0.0b5/kinde_fastapi/storage/fastapi_storage.py +81 -0
- kinde_python_sdk-2.0.0b5/kinde_fastapi/storage/fastapi_storage_factory.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_flask/examples/example_app.py +47 -0
- kinde_python_sdk-2.0.0b5/kinde_flask/framework/flask_framework.py +209 -0
- kinde_python_sdk-2.0.0b5/kinde_flask/framework/flask_framework_factory.py +24 -0
- kinde_python_sdk-2.0.0b5/kinde_flask/middleware/framework_middleware.py +34 -0
- kinde_python_sdk-2.0.0b5/kinde_flask/storage/flask_storage_factory.py +89 -0
- {kinde_python_sdk-2.0.0b3 → kinde_python_sdk-2.0.0b5/kinde_python_sdk.egg-info}/PKG-INFO +1 -1
- kinde_python_sdk-2.0.0b5/kinde_python_sdk.egg-info/SOURCES.txt +904 -0
- kinde_python_sdk-2.0.0b5/kinde_python_sdk.egg-info/not-zip-safe +1 -0
- {kinde_python_sdk-2.0.0b3 → kinde_python_sdk-2.0.0b5}/kinde_sdk/__init__.py +5 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/__init__.py +3 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/path_to_api.py +200 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/__init__.py +3 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_apis.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_apis_api_id.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_apis_api_id_applications.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_applications.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_applications_app_id_auth_logout_urls.py +13 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_applications_app_id_auth_redirect_urls.py +13 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_applications_application_id.py +11 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_applications_application_id_connections.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_applications_application_id_connections_connection_id.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_business.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_connected_apps_auth_url.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_connected_apps_revoke.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_connected_apps_token.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_connections.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_connections_connection_id.py +11 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_environment_feature_flags.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_environment_feature_flags_feature_flag_key.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_event_types.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_events_event_id.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_feature_flags.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_feature_flags_feature_flag_key.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_industries.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organization.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organization_org_code.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organization_org_code_handle.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organizations.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organizations_org_code_feature_flags.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organizations_org_code_feature_flags_feature_flag_key.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organizations_org_code_properties.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organizations_org_code_properties_property_key.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organizations_org_code_users.py +11 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organizations_org_code_users_user_id.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organizations_org_code_users_user_id_permissions.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organizations_org_code_users_user_id_permissions_permission_id.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organizations_org_code_users_user_id_roles.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_organizations_org_code_users_user_id_roles_role_id.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_permissions.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_permissions_permission_id.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_properties.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_properties_property_id.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_property_categories.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_property_categories_category_id.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_roles.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_roles_role_id.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_roles_role_id_permissions.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_roles_role_id_permissions_permission_id.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_subscribers.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_subscribers_subscriber_id.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_timezones.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_user.py +13 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_users.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_users_user_id_feature_flags_feature_flag_key.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_users_user_id_password.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_users_user_id_properties.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_users_user_id_properties_property_key.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_users_user_id_refresh_claims.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_webhooks.py +11 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/api_v1_webhooks_webhook_id.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/oauth2_introspect.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/oauth2_revoke.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/oauth2_user_profile.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/paths/oauth2_v2_user_profile.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tag_to_api.py +71 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/__init__.py +27 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/apis_api.py +32 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/applications_api.py +38 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/business_api.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/callbacks_api.py +38 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/connected_apps_api.py +28 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/connections_api.py +32 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/environments_api.py +30 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/feature_flags_api.py +28 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/industries_api.py +24 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/o_auth_api.py +30 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/organizations_api.py +68 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/permissions_api.py +30 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/properties_api.py +30 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/property_categories_api.py +28 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/roles_api.py +36 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/subscribers_api.py +28 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/timezones_api.py +24 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/users_api.py +44 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/apis/tags/webhooks_api.py +34 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/auth/__init__.py +8 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/auth/claims.py +83 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/auth/config_loader.py +22 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/auth/enums.py +20 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/auth/feature_flags.py +136 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/auth/login_options.py +29 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/auth/oauth.py +624 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/auth/permissions.py +97 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/auth/token_manager.py +168 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/auth/user_session.py +195 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/__init__.py +13 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/exceptions.py +19 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/framework/__init__.py +9 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/framework/framework_context.py +37 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/framework/framework_factory.py +120 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/framework/framework_interface.py +84 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/framework/null_framework.py +75 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/helpers.py +695 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/storage/__init__.py +14 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/storage/framework_aware_storage.py +105 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/storage/local_storage.py +52 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/storage/memory_storage.py +50 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/storage/storage_factory.py +68 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/storage/storage_interface.py +49 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/core/storage/storage_manager.py +232 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/management/__init__.py +11 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/management/api_client.py +1500 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/management/configuration.py +440 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/management/management_client.py +315 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/management/management_token_manager.py +92 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/__init__.py +5 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/add_organization_users_response.py +121 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/api.py +230 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/api_result.py +79 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/apis.py +109 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/applications.py +99 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/category.py +89 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/connected_apps_access_token.py +89 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/connected_apps_auth_url.py +89 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/connection.py +109 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/create_application_response.py +168 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/create_category_response.py +148 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/create_connection_response.py +148 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/create_organization_response.py +148 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/create_property_response.py +146 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/create_subscriber_success_response.py +128 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/create_user_response.py +126 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/create_webhook_response.py +158 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/delete_webhook_response.py +89 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/error.py +89 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/error_response.py +106 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/event_type.py +119 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_application_response.py +188 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_applications_response.py +136 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_categories_response.py +136 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_connections_response.py +136 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_environment_feature_flags_response.py +221 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_event_response.py +188 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_event_types_response.py +126 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_organization_feature_flags_response.py +211 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_organization_users_response.py +136 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_organizations_response.py +136 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_organizations_user_permissions_response.py +126 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_organizations_user_roles_response.py +136 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_permissions_response.py +136 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_properties_response.py +136 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_property_values_response.py +136 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_redirect_callback_urls_response.py +106 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_roles_response.py +136 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_subscriber_response.py +126 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_subscribers_response.py +136 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/get_webhooks_response.py +126 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/logout_redirect_urls.py +101 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/model_property.py +129 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/organization.py +109 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/organization_user.py +161 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/organization_user_permission.py +200 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/organization_user_role.py +99 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/organization_user_role_permissions.py +148 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/organization_users.py +57 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/permissions.py +109 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/property_value.py +119 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/redirect_callback_urls.py +101 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/role.py +109 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/roles.py +109 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/roles_permission_response.py +131 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/subscriber.py +109 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/subscribers_subscriber.py +119 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/success_response.py +89 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/token_error_response.py +89 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/token_introspect.py +141 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/update_organization_users_response.py +175 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/update_role_permissions_response.py +153 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/update_user_response.py +139 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/update_webhook_response.py +148 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/user.py +388 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/user_identity.py +138 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/user_profile.py +158 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/user_profile_v2.py +178 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/users.py +59 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/users_response.py +489 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/model/webhook.py +151 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/models/__init__.py +84 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/__init__.py +70 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_apis/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_apis/get.py +311 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_apis/post.py +471 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_apis_api_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_apis_api_id/delete.py +365 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_apis_api_id/get.py +365 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_apis_api_id_applications/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_apis_api_id_applications/patch.py +602 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications/get.py +420 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications/post.py +475 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_app_id_auth_logout_urls/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_app_id_auth_logout_urls/delete.py +416 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_app_id_auth_logout_urls/get.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_app_id_auth_logout_urls/post.py +520 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_app_id_auth_logout_urls/put.py +513 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_app_id_auth_redirect_urls/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_app_id_auth_redirect_urls/delete.py +416 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_app_id_auth_redirect_urls/get.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_app_id_auth_redirect_urls/post.py +520 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_app_id_auth_redirect_urls/put.py +513 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_application_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_application_id/delete.py +361 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_application_id/get.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_application_id/patch.py +559 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_application_id_connections/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_application_id_connections/get.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_application_id_connections_connection_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_application_id_connections_connection_id/delete.py +370 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_applications_application_id_connections_connection_id/post.py +351 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_business/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_business/get.py +447 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_business/patch.py +542 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_connected_apps_auth_url/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_connected_apps_auth_url/get.py +406 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_connected_apps_revoke/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_connected_apps_revoke/post.py +379 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_connected_apps_token/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_connected_apps_token/get.py +366 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_connections/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_connections/get.py +440 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_connections/post.py +614 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_connections_connection_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_connections_connection_id/delete.py +361 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_connections_connection_id/get.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_connections_connection_id/patch.py +552 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_environment_feature_flags/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_environment_feature_flags/delete.py +300 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_environment_feature_flags/get.py +300 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_environment_feature_flags_feature_flag_key/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_environment_feature_flags_feature_flag_key/delete.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_environment_feature_flags_feature_flag_key/patch.py +505 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_event_types/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_event_types/get.py +311 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_events_event_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_events_event_id/get.py +365 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_feature_flags/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_feature_flags/post.py +554 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_feature_flags_feature_flag_key/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_feature_flags_feature_flag_key/delete.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_feature_flags_feature_flag_key/put.py +494 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_industries/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_industries/get.py +333 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organization/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organization/get.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organization/post.py +640 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organization_org_code/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organization_org_code/delete.py +342 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organization_org_code/patch.py +617 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organization_org_code_handle/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organization_org_code_handle/delete.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations/get.py +430 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_feature_flags/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_feature_flags/delete.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_feature_flags/get.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_feature_flags_feature_flag_key/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_feature_flags_feature_flag_key/delete.py +363 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_feature_flags_feature_flag_key/patch.py +418 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_properties/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_properties/get.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_properties/patch.py +505 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_properties_property_key/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_properties_property_key/put.py +418 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users/get.py +537 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users/patch.py +642 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users/post.py +654 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users_user_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users_user_id/delete.py +363 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users_user_id_permissions/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users_user_id_permissions/get.py +411 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users_user_id_permissions/post.py +484 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users_user_id_permissions_permission_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users_user_id_permissions_permission_id/delete.py +372 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users_user_id_roles/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users_user_id_roles/get.py +338 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users_user_id_roles/post.py +484 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users_user_id_roles_role_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_organizations_org_code_users_user_id_roles_role_id/delete.py +372 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_permissions/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_permissions/get.py +442 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_permissions/post.py +458 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_permissions_permission_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_permissions_permission_id/delete.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_permissions_permission_id/patch.py +515 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_properties/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_properties/get.py +484 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_properties/post.py +558 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_properties_property_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_properties_property_id/delete.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_properties_property_id/put.py +539 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_property_categories/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_property_categories/get.py +484 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_property_categories/post.py +480 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_property_categories_category_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_property_categories_category_id/put.py +500 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_roles/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_roles/get.py +442 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_roles/post.py +468 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_roles_role_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_roles_role_id/delete.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_roles_role_id/patch.py +532 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_roles_role_id_permissions/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_roles_role_id_permissions/get.py +509 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_roles_role_id_permissions/patch.py +568 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_roles_role_id_permissions_permission_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_roles_role_id_permissions_permission_id/delete.py +363 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_subscribers/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_subscribers/get.py +433 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_subscribers/post.py +411 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_subscribers_subscriber_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_subscribers_subscriber_id/get.py +352 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_timezones/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_timezones/get.py +333 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_user/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_user/delete.py +364 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_user/get.py +383 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_user/patch.py +531 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_user/post.py +694 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_users/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_users/get.py +488 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_users_user_id_feature_flags_feature_flag_key/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_users_user_id_feature_flags_feature_flag_key/patch.py +418 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_users_user_id_password/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_users_user_id_password/put.py +595 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_users_user_id_properties/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_users_user_id_properties/get.py +354 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_users_user_id_properties/patch.py +505 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_users_user_id_properties_property_key/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_users_user_id_properties_property_key/put.py +418 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_users_user_id_refresh_claims/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_users_user_id_refresh_claims/post.py +365 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_webhooks/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_webhooks/get.py +311 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_webhooks/patch.py +515 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_webhooks/post.py +534 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_webhooks_webhook_id/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/api_v1_webhooks_webhook_id/delete.py +365 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/oauth2_introspect/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/oauth2_introspect/post.py +450 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/oauth2_revoke/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/oauth2_revoke/post.py +448 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/oauth2_user_profile/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/oauth2_user_profile/get.py +257 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/oauth2_v2_user_profile/__init__.py +7 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/paths/oauth2_v2_user_profile/get.py +270 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/__init__.py +0 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_kinde_api_client.py +207 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/__init__.py +0 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_add_organization_users_response.py +37 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_api.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_api_result.py +36 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_apis.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_applications.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_category.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_connected_apps_access_token.py +36 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_connected_apps_auth_url.py +37 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_connection.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_create_application_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_create_category_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_create_connection_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_create_organization_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_create_property_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_create_subscriber_success_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_create_user_response.py +37 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_create_webhook_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_delete_webhook_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_error.py +37 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_error_response.py +36 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_event_type.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_application_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_applications_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_categories_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_connections_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_environment_feature_flags_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_event_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_event_types_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_organization_feature_flags_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_organization_users_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_organizations_response.py +37 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_organizations_user_permissions_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_organizations_user_roles_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_permissions_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_properties_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_property_values_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_redirect_callback_urls_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_roles_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_subscriber_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_subscribers_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_get_webhooks_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_logout_redirect_urls.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_model_property.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_organization.py +37 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_organization_user.py +37 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_organization_user_permission.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_organization_user_role.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_organization_user_role_permissions.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_organization_users.py +27 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_permissions.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_property_value.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_redirect_callback_urls.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_role.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_roles.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_roles_permission_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_subscriber.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_subscribers_subscriber.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_success_response.py +36 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_token_error_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_token_introspect.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_update_organization_users_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_update_role_permissions_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_update_user_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_update_webhook_response.py +26 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_user.py +37 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_user_identity.py +37 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_user_profile.py +37 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_user_profile_v2.py +37 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_users.py +27 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_users_response.py +36 -0
- kinde_python_sdk-2.0.0b5/kinde_sdk/test/test_models/test_webhook.py +26 -0
- {kinde_python_sdk-2.0.0b3 → kinde_python_sdk-2.0.0b5}/pyproject.toml +9 -1
- kinde_python_sdk-2.0.0b3/kinde_python_sdk.egg-info/SOURCES.txt +0 -11
- {kinde_python_sdk-2.0.0b3 → kinde_python_sdk-2.0.0b5}/LICENSE +0 -0
- {kinde_python_sdk-2.0.0b3 → kinde_python_sdk-2.0.0b5}/README.md +0 -0
- {kinde_python_sdk-2.0.0b3 → kinde_python_sdk-2.0.0b5}/kinde_fastapi/__init__.py +0 -0
- {kinde_python_sdk-2.0.0b3 → kinde_python_sdk-2.0.0b5}/kinde_flask/__init__.py +0 -0
- {kinde_python_sdk-2.0.0b3 → kinde_python_sdk-2.0.0b5}/kinde_python_sdk.egg-info/dependency_links.txt +0 -0
- {kinde_python_sdk-2.0.0b3 → kinde_python_sdk-2.0.0b5}/kinde_python_sdk.egg-info/requires.txt +0 -0
- {kinde_python_sdk-2.0.0b3 → kinde_python_sdk-2.0.0b5}/kinde_python_sdk.egg-info/top_level.txt +0 -0
- {kinde_python_sdk-2.0.0b3 → kinde_python_sdk-2.0.0b5}/setup.cfg +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
include LICENSE
|
|
3
|
+
recursive-include kinde_sdk *.py
|
|
4
|
+
recursive-include kinde_sdk *.json
|
|
5
|
+
recursive-include kinde_sdk *.yaml
|
|
6
|
+
recursive-include kinde_sdk *.yml
|
|
7
|
+
recursive-include kinde_fastapi *.py
|
|
8
|
+
recursive-include kinde_fastapi *.json
|
|
9
|
+
recursive-include kinde_fastapi *.yaml
|
|
10
|
+
recursive-include kinde_fastapi *.yml
|
|
11
|
+
recursive-include kinde_flask *.py
|
|
12
|
+
recursive-include kinde_flask *.json
|
|
13
|
+
recursive-include kinde_flask *.yaml
|
|
14
|
+
recursive-include kinde_flask *.yml
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from fastapi import FastAPI, Request
|
|
2
|
+
from fastapi.responses import HTMLResponse
|
|
3
|
+
from starlette.middleware.sessions import SessionMiddleware
|
|
4
|
+
from .session import InMemorySessionMiddleware
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
import os
|
|
7
|
+
from dotenv import load_dotenv
|
|
8
|
+
import logging
|
|
9
|
+
from kinde_sdk.auth.oauth import OAuth
|
|
10
|
+
|
|
11
|
+
logger = logging.getLogger(__name__)
|
|
12
|
+
|
|
13
|
+
# Load environment variables from .env file
|
|
14
|
+
load_dotenv()
|
|
15
|
+
|
|
16
|
+
# Initialize FastAPI app
|
|
17
|
+
app = FastAPI(title="Kinde FastAPI Example")
|
|
18
|
+
|
|
19
|
+
# Add session middleware with proper configuration
|
|
20
|
+
app.add_middleware(
|
|
21
|
+
InMemorySessionMiddleware,
|
|
22
|
+
max_age=3600, # 1 hour
|
|
23
|
+
https_only=False
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
# Initialize Kinde OAuth with FastAPI framework
|
|
27
|
+
kinde_oauth = OAuth(
|
|
28
|
+
framework="fastapi",
|
|
29
|
+
app=app
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
# Example home route
|
|
33
|
+
@app.get("/", response_class=HTMLResponse)
|
|
34
|
+
async def home(request: Request):
|
|
35
|
+
"""
|
|
36
|
+
Home page that shows different content based on authentication status.
|
|
37
|
+
"""
|
|
38
|
+
if kinde_oauth.is_authenticated():
|
|
39
|
+
user = kinde_oauth.get_user_info()
|
|
40
|
+
return f"""
|
|
41
|
+
<html>
|
|
42
|
+
<body>
|
|
43
|
+
<h1>Welcome, {user.get('email', 'User')}!</h1>
|
|
44
|
+
<p>You are logged in.</p>
|
|
45
|
+
<a href="/logout">Logout</a>
|
|
46
|
+
</body>
|
|
47
|
+
</html>
|
|
48
|
+
"""
|
|
49
|
+
return """
|
|
50
|
+
<html>
|
|
51
|
+
<body>
|
|
52
|
+
<h1>Welcome to the Example App</h1>
|
|
53
|
+
<p>You are not logged in.</p>
|
|
54
|
+
<a href="/login">Login</a>
|
|
55
|
+
</body>
|
|
56
|
+
</html>
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
if __name__ == "__main__":
|
|
60
|
+
import uvicorn
|
|
61
|
+
uvicorn.run(app, host="127.0.0.1", port=5000)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
from fastapi import Request, Response
|
|
2
|
+
import json
|
|
3
|
+
import secrets
|
|
4
|
+
from datetime import datetime, timedelta
|
|
5
|
+
from typing import Optional, Any, Dict, Callable, Awaitable
|
|
6
|
+
from threading import Lock
|
|
7
|
+
from starlette.middleware.base import BaseHTTPMiddleware
|
|
8
|
+
from starlette.types import ASGIApp, Receive, Scope, Send
|
|
9
|
+
|
|
10
|
+
class InMemorySessionMiddleware(BaseHTTPMiddleware):
|
|
11
|
+
def __init__(
|
|
12
|
+
self,
|
|
13
|
+
app: ASGIApp,
|
|
14
|
+
session_cookie: str = "session",
|
|
15
|
+
max_age: int = 14 * 24 * 60 * 60, # 14 days in seconds
|
|
16
|
+
same_site: str = "lax",
|
|
17
|
+
https_only: bool = False
|
|
18
|
+
):
|
|
19
|
+
super().__init__(app)
|
|
20
|
+
self.session_cookie = session_cookie
|
|
21
|
+
self.max_age = max_age
|
|
22
|
+
self.same_site = same_site
|
|
23
|
+
self.https_only = https_only
|
|
24
|
+
self._sessions: Dict[str, Dict[str, Any]] = {}
|
|
25
|
+
self._lock = Lock() # Thread safety for session operations
|
|
26
|
+
|
|
27
|
+
async def dispatch(self, request: Request, call_next):
|
|
28
|
+
session_id = request.cookies.get(self.session_cookie)
|
|
29
|
+
|
|
30
|
+
if not session_id:
|
|
31
|
+
session_id = secrets.token_urlsafe(32)
|
|
32
|
+
session_data = {}
|
|
33
|
+
else:
|
|
34
|
+
session_data = self._get_session(session_id) or {}
|
|
35
|
+
|
|
36
|
+
# Add session to request scope
|
|
37
|
+
request.scope["session"] = session_data
|
|
38
|
+
|
|
39
|
+
# Process the request
|
|
40
|
+
response = await call_next(request)
|
|
41
|
+
|
|
42
|
+
# Update session in memory
|
|
43
|
+
if "session" in request.scope:
|
|
44
|
+
self._set_session(session_id, request.scope["session"])
|
|
45
|
+
|
|
46
|
+
# Set cookie
|
|
47
|
+
response.set_cookie(
|
|
48
|
+
key=self.session_cookie,
|
|
49
|
+
value=session_id,
|
|
50
|
+
max_age=self.max_age,
|
|
51
|
+
httponly=True,
|
|
52
|
+
samesite=self.same_site,
|
|
53
|
+
secure=self.https_only
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
return response
|
|
57
|
+
|
|
58
|
+
def _get_session(self, session_id: str) -> Optional[Dict[str, Any]]:
|
|
59
|
+
with self._lock:
|
|
60
|
+
return self._sessions.get(session_id)
|
|
61
|
+
|
|
62
|
+
def _set_session(self, session_id: str, data: Dict[str, Any]) -> None:
|
|
63
|
+
with self._lock:
|
|
64
|
+
self._sessions[session_id] = data
|
|
65
|
+
|
|
66
|
+
def delete_session(self, session_id: str) -> None:
|
|
67
|
+
with self._lock:
|
|
68
|
+
self._sessions.pop(session_id, None)
|
|
69
|
+
|
|
70
|
+
def cleanup_expired_sessions(self) -> None:
|
|
71
|
+
"""Optional: Method to clean up expired sessions if needed"""
|
|
72
|
+
with self._lock:
|
|
73
|
+
# Implementation would depend on how you want to track session expiration
|
|
74
|
+
pass
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
from typing import Optional, Dict, Any
|
|
2
|
+
from fastapi import FastAPI, Request, Depends
|
|
3
|
+
from fastapi.responses import RedirectResponse, HTMLResponse
|
|
4
|
+
from fastapi import FastAPI, Request, Depends
|
|
5
|
+
from fastapi.responses import RedirectResponse, HTMLResponse
|
|
6
|
+
from kinde_sdk.core.framework.framework_interface import FrameworkInterface
|
|
7
|
+
from kinde_sdk.auth.oauth import OAuth
|
|
8
|
+
from ..middleware.framework_middleware import FrameworkMiddleware
|
|
9
|
+
import os
|
|
10
|
+
import uuid
|
|
11
|
+
import logging
|
|
12
|
+
|
|
13
|
+
logger = logging.getLogger(__name__)
|
|
14
|
+
|
|
15
|
+
class FastAPIFramework(FrameworkInterface):
|
|
16
|
+
"""
|
|
17
|
+
FastAPI framework implementation.
|
|
18
|
+
This class provides FastAPI-specific functionality and integration.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
def __init__(self, app: Optional[FastAPI] = None):
|
|
22
|
+
"""
|
|
23
|
+
Initialize the FastAPI framework.
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
app (Optional[FastAPI]): The FastAPI application instance.
|
|
27
|
+
If not provided, a new instance will be created.
|
|
28
|
+
"""
|
|
29
|
+
self.app = app or FastAPI()
|
|
30
|
+
self._initialized = False
|
|
31
|
+
self._oauth = None
|
|
32
|
+
self._logger = logging.getLogger(__name__)
|
|
33
|
+
|
|
34
|
+
def get_name(self) -> str:
|
|
35
|
+
"""
|
|
36
|
+
Get the name of the framework.
|
|
37
|
+
|
|
38
|
+
Returns:
|
|
39
|
+
str: The name of the framework
|
|
40
|
+
"""
|
|
41
|
+
return "fastapi"
|
|
42
|
+
|
|
43
|
+
def get_description(self) -> str:
|
|
44
|
+
"""
|
|
45
|
+
Get a description of the framework.
|
|
46
|
+
|
|
47
|
+
Returns:
|
|
48
|
+
str: A description of the framework
|
|
49
|
+
"""
|
|
50
|
+
return "FastAPI framework implementation for Kinde authentication"
|
|
51
|
+
|
|
52
|
+
def start(self) -> None:
|
|
53
|
+
"""
|
|
54
|
+
Start the framework.
|
|
55
|
+
This method initializes any necessary FastAPI components and registers Kinde routes.
|
|
56
|
+
This method initializes any necessary FastAPI components and registers Kinde routes.
|
|
57
|
+
"""
|
|
58
|
+
if not self._initialized:
|
|
59
|
+
# Add framework middleware
|
|
60
|
+
self.app.add_middleware(FrameworkMiddleware)
|
|
61
|
+
|
|
62
|
+
# Register Kinde routes
|
|
63
|
+
self._register_kinde_routes()
|
|
64
|
+
|
|
65
|
+
self._initialized = True
|
|
66
|
+
|
|
67
|
+
def stop(self) -> None:
|
|
68
|
+
"""
|
|
69
|
+
Stop the framework.
|
|
70
|
+
This method cleans up any FastAPI resources.
|
|
71
|
+
"""
|
|
72
|
+
if self._initialized:
|
|
73
|
+
self._initialized = False
|
|
74
|
+
|
|
75
|
+
def get_app(self) -> FastAPI:
|
|
76
|
+
"""
|
|
77
|
+
Get the FastAPI application instance.
|
|
78
|
+
|
|
79
|
+
Returns:
|
|
80
|
+
FastAPI: The FastAPI application instance
|
|
81
|
+
"""
|
|
82
|
+
return self.app
|
|
83
|
+
|
|
84
|
+
def get_request(self) -> Optional[Request]:
|
|
85
|
+
"""
|
|
86
|
+
Get the current request object.
|
|
87
|
+
|
|
88
|
+
Returns:
|
|
89
|
+
Optional[Request]: The current FastAPI request object, if available
|
|
90
|
+
"""
|
|
91
|
+
from kinde_sdk.core.framework.framework_context import FrameworkContext
|
|
92
|
+
return FrameworkContext.get_request()
|
|
93
|
+
|
|
94
|
+
def get_user_id(self) -> Optional[str]:
|
|
95
|
+
"""
|
|
96
|
+
Get the user ID from the current request.
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
Optional[str]: The user ID, or None if not available
|
|
100
|
+
"""
|
|
101
|
+
request = self.get_request()
|
|
102
|
+
if not request:
|
|
103
|
+
return None
|
|
104
|
+
return request.session.get("user_id")
|
|
105
|
+
|
|
106
|
+
def set_oauth(self, oauth: OAuth) -> None:
|
|
107
|
+
"""
|
|
108
|
+
Set the OAuth instance for this framework.
|
|
109
|
+
|
|
110
|
+
Args:
|
|
111
|
+
oauth (OAuth): The OAuth instance
|
|
112
|
+
"""
|
|
113
|
+
self._oauth = oauth
|
|
114
|
+
|
|
115
|
+
def _register_kinde_routes(self) -> None:
|
|
116
|
+
"""
|
|
117
|
+
Register all Kinde-specific routes with the FastAPI application.
|
|
118
|
+
"""
|
|
119
|
+
# Helper function to get current user
|
|
120
|
+
async def get_current_user(request: Request):
|
|
121
|
+
if not self._oauth.is_authenticated(request):
|
|
122
|
+
return None
|
|
123
|
+
try:
|
|
124
|
+
return self._oauth.get_user_info(request)
|
|
125
|
+
except ValueError:
|
|
126
|
+
return None
|
|
127
|
+
|
|
128
|
+
# Login route
|
|
129
|
+
@self.app.get("/login")
|
|
130
|
+
async def login(request: Request):
|
|
131
|
+
"""Redirect to Kinde login page."""
|
|
132
|
+
url=await self._oauth.login()
|
|
133
|
+
self._logger.warning(f"[Login] Session is: {request.session}")
|
|
134
|
+
return RedirectResponse(url=url)
|
|
135
|
+
|
|
136
|
+
# Callback route
|
|
137
|
+
@self.app.get("/callback")
|
|
138
|
+
async def callback(request: Request, code: str, state: Optional[str] = None):
|
|
139
|
+
"""Handle the OAuth callback from Kinde."""
|
|
140
|
+
try:
|
|
141
|
+
# Generate a unique user ID for the session
|
|
142
|
+
logger.warning(f"[Callback] Request session is: {request.session}")
|
|
143
|
+
user_id = request.session.get("user_id") or str(uuid.uuid4())
|
|
144
|
+
|
|
145
|
+
# Use OAuth's handle_redirect method to process the callback
|
|
146
|
+
logger.warning(f"[Callback] code[{code}] state[{state}] user_id[{user_id}]")
|
|
147
|
+
result = await self._oauth.handle_redirect(code, user_id, state)
|
|
148
|
+
|
|
149
|
+
# Store user ID in session
|
|
150
|
+
logger.warning(f"[Callback] Storing user ID in session: {user_id}")
|
|
151
|
+
request.session["user_id"] = user_id
|
|
152
|
+
|
|
153
|
+
# Create response with explicit session cookie settings
|
|
154
|
+
self._logger.warning(f"[Callback] Request session is: {request.session}")
|
|
155
|
+
self._logger.warning(f"[Callback] The full result: {result}")
|
|
156
|
+
response = RedirectResponse(url="/")
|
|
157
|
+
|
|
158
|
+
return response
|
|
159
|
+
except Exception as e:
|
|
160
|
+
logger.error(f"Authentication failed: {str(e)}")
|
|
161
|
+
return HTMLResponse(f"Authentication failed: {str(e)}")
|
|
162
|
+
|
|
163
|
+
# Logout route
|
|
164
|
+
@self.app.get("/logout")
|
|
165
|
+
async def logout(request: Request):
|
|
166
|
+
"""Logout the user and redirect to Kinde logout page."""
|
|
167
|
+
request.session.clear()
|
|
168
|
+
return RedirectResponse(url=await self._oauth.logout())
|
|
169
|
+
|
|
170
|
+
# Register route
|
|
171
|
+
@self.app.get("/register")
|
|
172
|
+
async def register(request: Request):
|
|
173
|
+
"""Redirect to Kinde registration page."""
|
|
174
|
+
return RedirectResponse(url=await self._oauth.register())
|
|
175
|
+
|
|
176
|
+
# User info route
|
|
177
|
+
@self.app.get("/user")
|
|
178
|
+
async def get_user(request: Request):
|
|
179
|
+
"""Get the current user's information."""
|
|
180
|
+
if not self._oauth.is_authenticated(request):
|
|
181
|
+
return RedirectResponse(url=await self._oauth.login())
|
|
182
|
+
return self._oauth.get_user_info(request)
|
|
183
|
+
|
|
184
|
+
def can_auto_detect(self) -> bool:
|
|
185
|
+
"""
|
|
186
|
+
Check if this framework can be auto-detected.
|
|
187
|
+
|
|
188
|
+
Returns:
|
|
189
|
+
bool: True if FastAPI is installed and available
|
|
190
|
+
"""
|
|
191
|
+
try:
|
|
192
|
+
import fastapi
|
|
193
|
+
return True
|
|
194
|
+
except ImportError:
|
|
195
|
+
return False
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from typing import Optional, Dict, Any
|
|
2
|
+
from fastapi import FastAPI
|
|
3
|
+
from kinde_sdk.core.framework.framework_factory import FrameworkFactory
|
|
4
|
+
from .fastapi_framework import FastAPIFramework
|
|
5
|
+
|
|
6
|
+
class FastAPIFrameworkFactory:
|
|
7
|
+
"""
|
|
8
|
+
Factory class for creating FastAPI framework instances.
|
|
9
|
+
This factory is responsible for creating and registering FastAPI framework instances.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
@staticmethod
|
|
13
|
+
def create_framework(app: Optional[FastAPI] = None) -> FastAPIFramework:
|
|
14
|
+
"""
|
|
15
|
+
Create a FastAPI framework instance.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
app (Optional[FastAPI]): The FastAPI application instance.
|
|
19
|
+
If not provided, a new instance will be created.
|
|
20
|
+
|
|
21
|
+
Returns:
|
|
22
|
+
FastAPIFramework: A FastAPI framework instance
|
|
23
|
+
"""
|
|
24
|
+
return FastAPIFramework(app)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from starlette.middleware.base import BaseHTTPMiddleware
|
|
2
|
+
from starlette.requests import Request
|
|
3
|
+
from starlette.responses import Response
|
|
4
|
+
from kinde_sdk.core.framework.framework_context import FrameworkContext
|
|
5
|
+
|
|
6
|
+
class FrameworkMiddleware(BaseHTTPMiddleware):
|
|
7
|
+
"""
|
|
8
|
+
Middleware that sets the current request in the framework context.
|
|
9
|
+
This allows framework-specific storage implementations to access the current request
|
|
10
|
+
without needing to pass it through the entire call chain.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
async def dispatch(self, request: Request, call_next) -> Response:
|
|
14
|
+
"""
|
|
15
|
+
Process the request and set it in the framework context.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
request (Request): The incoming request
|
|
19
|
+
call_next: The next middleware or route handler
|
|
20
|
+
|
|
21
|
+
Returns:
|
|
22
|
+
Response: The response from the next middleware or route handler
|
|
23
|
+
"""
|
|
24
|
+
# Set the request in the context
|
|
25
|
+
FrameworkContext.set_request(request)
|
|
26
|
+
try:
|
|
27
|
+
# Process the request
|
|
28
|
+
response = await call_next(request)
|
|
29
|
+
return response
|
|
30
|
+
finally:
|
|
31
|
+
# Clean up the context
|
|
32
|
+
FrameworkContext.clear_request()
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from typing import Dict, Optional
|
|
2
|
+
from kinde_sdk.core.storage.framework_aware_storage import FrameworkAwareStorage
|
|
3
|
+
from kinde_sdk.core.storage.framework_aware_storage import FrameworkAwareStorage
|
|
4
|
+
from fastapi import Request
|
|
5
|
+
from kinde_sdk.core.framework.framework_context import FrameworkContext
|
|
6
|
+
import logging
|
|
7
|
+
|
|
8
|
+
logger = logging.getLogger(__name__)
|
|
9
|
+
|
|
10
|
+
class FastAPIStorage(FrameworkAwareStorage):
|
|
11
|
+
"""
|
|
12
|
+
FastAPI storage implementation that uses FastAPI's session management.
|
|
13
|
+
This implementation stores data in the session using cookies.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
def __init__(self):
|
|
17
|
+
"""Initialize the FastAPI storage."""
|
|
18
|
+
super().__init__()
|
|
19
|
+
|
|
20
|
+
def get(self, key: str) -> Optional[Dict]:
|
|
21
|
+
"""
|
|
22
|
+
Retrieve data associated with the given key from the session.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
key (str): The key to retrieve data for.
|
|
26
|
+
|
|
27
|
+
Returns:
|
|
28
|
+
Optional[Dict]: The stored data or None if not found.
|
|
29
|
+
"""
|
|
30
|
+
session = self._get_session()
|
|
31
|
+
|
|
32
|
+
if session is None:
|
|
33
|
+
logger.error("No session object found in request")
|
|
34
|
+
return None
|
|
35
|
+
|
|
36
|
+
return session.get(key)
|
|
37
|
+
|
|
38
|
+
def set(self, key: str, value: Dict) -> None:
|
|
39
|
+
"""
|
|
40
|
+
Store data associated with the given key in the session.
|
|
41
|
+
|
|
42
|
+
Args:
|
|
43
|
+
key (str): The key to store the data under.
|
|
44
|
+
value (Dict): The data to store.
|
|
45
|
+
"""
|
|
46
|
+
session = self._get_session()
|
|
47
|
+
|
|
48
|
+
if session is not None:
|
|
49
|
+
session[key] = value
|
|
50
|
+
# Mark session as modified for FastAPI/Starlette
|
|
51
|
+
if hasattr(session, 'modified'):
|
|
52
|
+
session.modified = True
|
|
53
|
+
|
|
54
|
+
def set_flat(self, value: str) -> None:
|
|
55
|
+
"""
|
|
56
|
+
Store flat data in the session.
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
value (str): The data to store.
|
|
60
|
+
"""
|
|
61
|
+
session = self._get_session()
|
|
62
|
+
if session is not None:
|
|
63
|
+
session["_flat_data"] = value
|
|
64
|
+
# Mark session as modified for FastAPI/Starlette
|
|
65
|
+
if hasattr(session, 'modified'):
|
|
66
|
+
session.modified = True
|
|
67
|
+
|
|
68
|
+
def delete(self, key: str) -> None:
|
|
69
|
+
"""
|
|
70
|
+
Delete data associated with the given key from the session.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
key (str): The key to delete data for.
|
|
74
|
+
"""
|
|
75
|
+
logger.warning(f"Deleting a session key")
|
|
76
|
+
session = self._get_session()
|
|
77
|
+
if session is not None and key in session:
|
|
78
|
+
del session[key]
|
|
79
|
+
# Mark session as modified for FastAPI/Starlette
|
|
80
|
+
if hasattr(session, 'modified'):
|
|
81
|
+
session.modified = True
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from typing import Dict, Any
|
|
2
|
+
from kinde_sdk.core.storage.storage_interface import StorageInterface
|
|
3
|
+
from kinde_sdk.core.storage.storage_factory import StorageFactory
|
|
4
|
+
from .fastapi_storage import FastAPIStorage
|
|
5
|
+
|
|
6
|
+
class FastAPIStorageFactory:
|
|
7
|
+
"""
|
|
8
|
+
Factory class for creating FastAPI storage instances.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
@staticmethod
|
|
12
|
+
def create_storage(config: Dict[str, Any] = None) -> StorageInterface:
|
|
13
|
+
"""
|
|
14
|
+
Create a FastAPI storage instance.
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
config (Dict[str, Any], optional): Configuration dictionary. Not used in this implementation
|
|
18
|
+
but kept for consistency with other storage factories.
|
|
19
|
+
|
|
20
|
+
Returns:
|
|
21
|
+
StorageInterface: A FastAPI storage instance.
|
|
22
|
+
"""
|
|
23
|
+
return FastAPIStorage()
|
|
24
|
+
|
|
25
|
+
# Register the FastAPI storage factory
|
|
26
|
+
StorageFactory.register_framework_factory("fastapi", FastAPIStorageFactory)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from flask import Flask, render_template_string
|
|
2
|
+
import os
|
|
3
|
+
from dotenv import load_dotenv
|
|
4
|
+
|
|
5
|
+
from kinde_sdk.auth.oauth import OAuth
|
|
6
|
+
|
|
7
|
+
# Load environment variables from .env file
|
|
8
|
+
load_dotenv()
|
|
9
|
+
|
|
10
|
+
# Initialize Flask app
|
|
11
|
+
app = Flask(__name__)
|
|
12
|
+
|
|
13
|
+
# Initialize Kinde OAuth with Flask framework
|
|
14
|
+
kinde_oauth = OAuth(
|
|
15
|
+
framework="flask",
|
|
16
|
+
app=app
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
# Example home route
|
|
20
|
+
@app.route('/')
|
|
21
|
+
def home():
|
|
22
|
+
"""
|
|
23
|
+
Home page that shows different content based on authentication status.
|
|
24
|
+
"""
|
|
25
|
+
if kinde_oauth.is_authenticated():
|
|
26
|
+
user = kinde_oauth.get_user_info()
|
|
27
|
+
return render_template_string("""
|
|
28
|
+
<html>
|
|
29
|
+
<body>
|
|
30
|
+
<h1>Welcome, {{ user.email }}!</h1>
|
|
31
|
+
<p>You are logged in.</p>
|
|
32
|
+
<a href="/logout">Logout</a>
|
|
33
|
+
</body>
|
|
34
|
+
</html>
|
|
35
|
+
""", user=user)
|
|
36
|
+
return render_template_string("""
|
|
37
|
+
<html>
|
|
38
|
+
<body>
|
|
39
|
+
<h1>Welcome to the Example App</h1>
|
|
40
|
+
<p>You are not logged in.</p>
|
|
41
|
+
<a href="/login">Login</a>
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
|
44
|
+
""")
|
|
45
|
+
|
|
46
|
+
if __name__ == '__main__':
|
|
47
|
+
app.run(debug=True)
|