workos 5.22.0__tar.gz → 5.23.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 (147) hide show
  1. {workos-5.22.0 → workos-5.23.0}/PKG-INFO +1 -1
  2. {workos-5.22.0 → workos-5.23.0}/tests/test_user_management.py +23 -0
  3. {workos-5.22.0 → workos-5.23.0}/workos/__about__.py +1 -1
  4. {workos-5.22.0 → workos-5.23.0}/workos/user_management.py +4 -0
  5. {workos-5.22.0 → workos-5.23.0}/workos.egg-info/PKG-INFO +1 -1
  6. {workos-5.22.0 → workos-5.23.0}/LICENSE +0 -0
  7. {workos-5.22.0 → workos-5.23.0}/README.md +0 -0
  8. {workos-5.22.0 → workos-5.23.0}/setup.cfg +0 -0
  9. {workos-5.22.0 → workos-5.23.0}/setup.py +0 -0
  10. {workos-5.22.0 → workos-5.23.0}/tests/test_async_http_client.py +0 -0
  11. {workos-5.22.0 → workos-5.23.0}/tests/test_audit_logs.py +0 -0
  12. {workos-5.22.0 → workos-5.23.0}/tests/test_client.py +0 -0
  13. {workos-5.22.0 → workos-5.23.0}/tests/test_directory_sync.py +0 -0
  14. {workos-5.22.0 → workos-5.23.0}/tests/test_events.py +0 -0
  15. {workos-5.22.0 → workos-5.23.0}/tests/test_fga.py +0 -0
  16. {workos-5.22.0 → workos-5.23.0}/tests/test_mfa.py +0 -0
  17. {workos-5.22.0 → workos-5.23.0}/tests/test_organizations.py +0 -0
  18. {workos-5.22.0 → workos-5.23.0}/tests/test_passwordless.py +0 -0
  19. {workos-5.22.0 → workos-5.23.0}/tests/test_portal.py +0 -0
  20. {workos-5.22.0 → workos-5.23.0}/tests/test_session.py +0 -0
  21. {workos-5.22.0 → workos-5.23.0}/tests/test_sso.py +0 -0
  22. {workos-5.22.0 → workos-5.23.0}/tests/test_sync_http_client.py +0 -0
  23. {workos-5.22.0 → workos-5.23.0}/tests/test_webhooks.py +0 -0
  24. {workos-5.22.0 → workos-5.23.0}/tests/test_widgets.py +0 -0
  25. {workos-5.22.0 → workos-5.23.0}/workos/__init__.py +0 -0
  26. {workos-5.22.0 → workos-5.23.0}/workos/_base_client.py +0 -0
  27. {workos-5.22.0 → workos-5.23.0}/workos/_client_configuration.py +0 -0
  28. {workos-5.22.0 → workos-5.23.0}/workos/async_client.py +0 -0
  29. {workos-5.22.0 → workos-5.23.0}/workos/audit_logs.py +0 -0
  30. {workos-5.22.0 → workos-5.23.0}/workos/client.py +0 -0
  31. {workos-5.22.0 → workos-5.23.0}/workos/directory_sync.py +0 -0
  32. {workos-5.22.0 → workos-5.23.0}/workos/events.py +0 -0
  33. {workos-5.22.0 → workos-5.23.0}/workos/exceptions.py +0 -0
  34. {workos-5.22.0 → workos-5.23.0}/workos/fga.py +0 -0
  35. {workos-5.22.0 → workos-5.23.0}/workos/mfa.py +0 -0
  36. {workos-5.22.0 → workos-5.23.0}/workos/organizations.py +0 -0
  37. {workos-5.22.0 → workos-5.23.0}/workos/passwordless.py +0 -0
  38. {workos-5.22.0 → workos-5.23.0}/workos/portal.py +0 -0
  39. {workos-5.22.0 → workos-5.23.0}/workos/py.typed +0 -0
  40. {workos-5.22.0 → workos-5.23.0}/workos/session.py +0 -0
  41. {workos-5.22.0 → workos-5.23.0}/workos/sso.py +0 -0
  42. {workos-5.22.0 → workos-5.23.0}/workos/types/__init__.py +0 -0
  43. {workos-5.22.0 → workos-5.23.0}/workos/types/audit_logs/__init__.py +0 -0
  44. {workos-5.22.0 → workos-5.23.0}/workos/types/audit_logs/audit_log_event.py +0 -0
  45. {workos-5.22.0 → workos-5.23.0}/workos/types/audit_logs/audit_log_event_actor.py +0 -0
  46. {workos-5.22.0 → workos-5.23.0}/workos/types/audit_logs/audit_log_event_context.py +0 -0
  47. {workos-5.22.0 → workos-5.23.0}/workos/types/audit_logs/audit_log_event_target.py +0 -0
  48. {workos-5.22.0 → workos-5.23.0}/workos/types/audit_logs/audit_log_export.py +0 -0
  49. {workos-5.22.0 → workos-5.23.0}/workos/types/audit_logs/audit_log_metadata.py +0 -0
  50. {workos-5.22.0 → workos-5.23.0}/workos/types/directory_sync/__init__.py +0 -0
  51. {workos-5.22.0 → workos-5.23.0}/workos/types/directory_sync/directory.py +0 -0
  52. {workos-5.22.0 → workos-5.23.0}/workos/types/directory_sync/directory_group.py +0 -0
  53. {workos-5.22.0 → workos-5.23.0}/workos/types/directory_sync/directory_state.py +0 -0
  54. {workos-5.22.0 → workos-5.23.0}/workos/types/directory_sync/directory_type.py +0 -0
  55. {workos-5.22.0 → workos-5.23.0}/workos/types/directory_sync/directory_user.py +0 -0
  56. {workos-5.22.0 → workos-5.23.0}/workos/types/directory_sync/list_filters.py +0 -0
  57. {workos-5.22.0 → workos-5.23.0}/workos/types/events/__init__.py +0 -0
  58. {workos-5.22.0 → workos-5.23.0}/workos/types/events/authentication_payload.py +0 -0
  59. {workos-5.22.0 → workos-5.23.0}/workos/types/events/connection_payload_with_legacy_fields.py +0 -0
  60. {workos-5.22.0 → workos-5.23.0}/workos/types/events/directory_group_membership_payload.py +0 -0
  61. {workos-5.22.0 → workos-5.23.0}/workos/types/events/directory_group_with_previous_attributes.py +0 -0
  62. {workos-5.22.0 → workos-5.23.0}/workos/types/events/directory_payload.py +0 -0
  63. {workos-5.22.0 → workos-5.23.0}/workos/types/events/directory_payload_with_legacy_fields.py +0 -0
  64. {workos-5.22.0 → workos-5.23.0}/workos/types/events/directory_user_with_previous_attributes.py +0 -0
  65. {workos-5.22.0 → workos-5.23.0}/workos/types/events/event.py +0 -0
  66. {workos-5.22.0 → workos-5.23.0}/workos/types/events/event_model.py +0 -0
  67. {workos-5.22.0 → workos-5.23.0}/workos/types/events/event_type.py +0 -0
  68. {workos-5.22.0 → workos-5.23.0}/workos/types/events/list_filters.py +0 -0
  69. {workos-5.22.0 → workos-5.23.0}/workos/types/events/organization_domain_verification_failed_payload.py +0 -0
  70. {workos-5.22.0 → workos-5.23.0}/workos/types/events/previous_attributes.py +0 -0
  71. {workos-5.22.0 → workos-5.23.0}/workos/types/events/session_created_payload.py +0 -0
  72. {workos-5.22.0 → workos-5.23.0}/workos/types/fga/__init__.py +0 -0
  73. {workos-5.22.0 → workos-5.23.0}/workos/types/fga/authorization_resource_types.py +0 -0
  74. {workos-5.22.0 → workos-5.23.0}/workos/types/fga/authorization_resources.py +0 -0
  75. {workos-5.22.0 → workos-5.23.0}/workos/types/fga/check.py +0 -0
  76. {workos-5.22.0 → workos-5.23.0}/workos/types/fga/list_filters.py +0 -0
  77. {workos-5.22.0 → workos-5.23.0}/workos/types/fga/warnings.py +0 -0
  78. {workos-5.22.0 → workos-5.23.0}/workos/types/fga/warrant.py +0 -0
  79. {workos-5.22.0 → workos-5.23.0}/workos/types/list_resource.py +0 -0
  80. {workos-5.22.0 → workos-5.23.0}/workos/types/metadata.py +0 -0
  81. {workos-5.22.0 → workos-5.23.0}/workos/types/mfa/__init__.py +0 -0
  82. {workos-5.22.0 → workos-5.23.0}/workos/types/mfa/authentication_challenge.py +0 -0
  83. {workos-5.22.0 → workos-5.23.0}/workos/types/mfa/authentication_challenge_verification_response.py +0 -0
  84. {workos-5.22.0 → workos-5.23.0}/workos/types/mfa/authentication_factor.py +0 -0
  85. {workos-5.22.0 → workos-5.23.0}/workos/types/mfa/authentication_factor_totp_and_challenge_response.py +0 -0
  86. {workos-5.22.0 → workos-5.23.0}/workos/types/mfa/enroll_authentication_factor_type.py +0 -0
  87. {workos-5.22.0 → workos-5.23.0}/workos/types/organizations/__init__.py +0 -0
  88. {workos-5.22.0 → workos-5.23.0}/workos/types/organizations/domain_data_input.py +0 -0
  89. {workos-5.22.0 → workos-5.23.0}/workos/types/organizations/list_filters.py +0 -0
  90. {workos-5.22.0 → workos-5.23.0}/workos/types/organizations/organization.py +0 -0
  91. {workos-5.22.0 → workos-5.23.0}/workos/types/organizations/organization_common.py +0 -0
  92. {workos-5.22.0 → workos-5.23.0}/workos/types/organizations/organization_domain.py +0 -0
  93. {workos-5.22.0 → workos-5.23.0}/workos/types/passwordless/__init__.py +0 -0
  94. {workos-5.22.0 → workos-5.23.0}/workos/types/passwordless/passwordless_session.py +0 -0
  95. {workos-5.22.0 → workos-5.23.0}/workos/types/passwordless/passwordless_session_type.py +0 -0
  96. {workos-5.22.0 → workos-5.23.0}/workos/types/portal/__init__.py +0 -0
  97. {workos-5.22.0 → workos-5.23.0}/workos/types/portal/portal_link.py +0 -0
  98. {workos-5.22.0 → workos-5.23.0}/workos/types/portal/portal_link_intent.py +0 -0
  99. {workos-5.22.0 → workos-5.23.0}/workos/types/portal/portal_link_intent_options.py +0 -0
  100. {workos-5.22.0 → workos-5.23.0}/workos/types/roles/__init__.py +0 -0
  101. {workos-5.22.0 → workos-5.23.0}/workos/types/roles/role.py +0 -0
  102. {workos-5.22.0 → workos-5.23.0}/workos/types/sso/__init__.py +0 -0
  103. {workos-5.22.0 → workos-5.23.0}/workos/types/sso/connection.py +0 -0
  104. {workos-5.22.0 → workos-5.23.0}/workos/types/sso/connection_domain.py +0 -0
  105. {workos-5.22.0 → workos-5.23.0}/workos/types/sso/profile.py +0 -0
  106. {workos-5.22.0 → workos-5.23.0}/workos/types/sso/sso_provider_type.py +0 -0
  107. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/__init__.py +0 -0
  108. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/authenticate_with_common.py +0 -0
  109. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/authentication_response.py +0 -0
  110. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/email_verification.py +0 -0
  111. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/impersonator.py +0 -0
  112. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/invitation.py +0 -0
  113. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/list_filters.py +0 -0
  114. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/magic_auth.py +0 -0
  115. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/oauth_tokens.py +0 -0
  116. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/organization_membership.py +0 -0
  117. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/password_hash_type.py +0 -0
  118. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/password_reset.py +0 -0
  119. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/screen_hint.py +0 -0
  120. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/session.py +0 -0
  121. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/user.py +0 -0
  122. {workos-5.22.0 → workos-5.23.0}/workos/types/user_management/user_management_provider_type.py +0 -0
  123. {workos-5.22.0 → workos-5.23.0}/workos/types/webhooks/__init__.py +0 -0
  124. {workos-5.22.0 → workos-5.23.0}/workos/types/webhooks/webhook.py +0 -0
  125. {workos-5.22.0 → workos-5.23.0}/workos/types/webhooks/webhook_model.py +0 -0
  126. {workos-5.22.0 → workos-5.23.0}/workos/types/webhooks/webhook_payload.py +0 -0
  127. {workos-5.22.0 → workos-5.23.0}/workos/types/widgets/__init__.py +0 -0
  128. {workos-5.22.0 → workos-5.23.0}/workos/types/widgets/widget_scope.py +0 -0
  129. {workos-5.22.0 → workos-5.23.0}/workos/types/widgets/widget_token_response.py +0 -0
  130. {workos-5.22.0 → workos-5.23.0}/workos/types/workos_model.py +0 -0
  131. {workos-5.22.0 → workos-5.23.0}/workos/typing/__init__.py +0 -0
  132. {workos-5.22.0 → workos-5.23.0}/workos/typing/literals.py +0 -0
  133. {workos-5.22.0 → workos-5.23.0}/workos/typing/sync_or_async.py +0 -0
  134. {workos-5.22.0 → workos-5.23.0}/workos/typing/untyped_literal.py +0 -0
  135. {workos-5.22.0 → workos-5.23.0}/workos/typing/webhooks.py +0 -0
  136. {workos-5.22.0 → workos-5.23.0}/workos/utils/__init__.py +0 -0
  137. {workos-5.22.0 → workos-5.23.0}/workos/utils/_base_http_client.py +0 -0
  138. {workos-5.22.0 → workos-5.23.0}/workos/utils/http_client.py +0 -0
  139. {workos-5.22.0 → workos-5.23.0}/workos/utils/pagination_order.py +0 -0
  140. {workos-5.22.0 → workos-5.23.0}/workos/utils/request_helper.py +0 -0
  141. {workos-5.22.0 → workos-5.23.0}/workos/webhooks.py +0 -0
  142. {workos-5.22.0 → workos-5.23.0}/workos/widgets.py +0 -0
  143. {workos-5.22.0 → workos-5.23.0}/workos.egg-info/SOURCES.txt +0 -0
  144. {workos-5.22.0 → workos-5.23.0}/workos.egg-info/dependency_links.txt +0 -0
  145. {workos-5.22.0 → workos-5.23.0}/workos.egg-info/not-zip-safe +0 -0
  146. {workos-5.22.0 → workos-5.23.0}/workos.egg-info/requires.txt +0 -0
  147. {workos-5.22.0 → workos-5.23.0}/workos.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: workos
3
- Version: 5.22.0
3
+ Version: 5.23.0
4
4
  Summary: WorkOS Python Client
5
5
  Home-page: https://github.com/workos-inc/workos-python
6
6
  Author: WorkOS
@@ -344,6 +344,29 @@ class TestUserManagementBase(UserManagementFixtures):
344
344
  "provider": "authkit",
345
345
  }
346
346
 
347
+ def test_authorization_url_has_expected_query_params_with_provider_scopes(self):
348
+ provider = "GoogleOAuth"
349
+ provider_scopes = [
350
+ "https://www.googleapis.com/auth/calendar",
351
+ "https://www.googleapis.com/auth/admin.directory.group",
352
+ ]
353
+ redirect_uri = "https://localhost/auth/callback"
354
+ authorization_url = self.user_management.get_authorization_url(
355
+ provider=provider,
356
+ provider_scopes=provider_scopes,
357
+ redirect_uri=redirect_uri,
358
+ )
359
+
360
+ parsed_url = urlparse(authorization_url)
361
+ assert parsed_url.path == "/user_management/authorize"
362
+ assert dict(parse_qsl(str(parsed_url.query))) == {
363
+ "provider": provider,
364
+ "provider_scopes": ",".join(provider_scopes),
365
+ "client_id": self.http_client.client_id,
366
+ "redirect_uri": redirect_uri,
367
+ "response_type": RESPONSE_TYPE_CODE,
368
+ }
369
+
347
370
  def test_get_jwks_url(self):
348
371
  expected = "%ssso/jwks/%s" % (
349
372
  self.http_client.base_url,
@@ -12,7 +12,7 @@ __package_name__ = "workos"
12
12
 
13
13
  __package_url__ = "https://github.com/workos-inc/workos-python"
14
14
 
15
- __version__ = "5.22.0"
15
+ __version__ = "5.23.0"
16
16
 
17
17
  __author__ = "WorkOS"
18
18
 
@@ -358,6 +358,7 @@ class UserManagementModule(Protocol):
358
358
  login_hint: Optional[str] = None,
359
359
  state: Optional[str] = None,
360
360
  provider: Optional[UserManagementProviderType] = None,
361
+ provider_scopes: Optional[Sequence[str]] = None,
361
362
  connection_id: Optional[str] = None,
362
363
  organization_id: Optional[str] = None,
363
364
  code_challenge: Optional[str] = None,
@@ -379,6 +380,7 @@ class UserManagementModule(Protocol):
379
380
  The value of this parameter should be a WorkOS Organization ID. (Optional)
380
381
  provider (UserManagementProviderType): The provider connection selector is used to initiate SSO using an OAuth-compatible provider.
381
382
  Currently, the supported values for provider are 'authkit', 'AppleOAuth', 'GitHubOAuth, 'GoogleOAuth', and 'MicrosoftOAuth'. (Optional)
383
+ provider_scopes (Sequence[str]): Can be used to specify additional scopes that will be requested when initiating SSO using an OAuth provider. (Optional)
382
384
  domain_hint (str): Can be used to pre-fill the domain field when initiating authentication with Microsoft OAuth,
383
385
  or with a GoogleSAML connection type. (Optional)
384
386
  login_hint (str): Can be used to pre-fill the username/email address field of the IdP sign-in page for the user,
@@ -412,6 +414,8 @@ class UserManagementModule(Protocol):
412
414
  params["organization_id"] = organization_id
413
415
  if provider is not None:
414
416
  params["provider"] = provider
417
+ if provider_scopes is not None:
418
+ params["provider_scopes"] = ",".join(provider_scopes)
415
419
  if domain_hint is not None:
416
420
  params["domain_hint"] = domain_hint
417
421
  if login_hint is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: workos
3
- Version: 5.22.0
3
+ Version: 5.23.0
4
4
  Summary: WorkOS Python Client
5
5
  Home-page: https://github.com/workos-inc/workos-python
6
6
  Author: WorkOS
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes