Skip to content

Commit

Permalink
Retired Emails Changes (#211)
Browse files Browse the repository at this point in the history
* Retired Emails Changes

* Minor version bump.

* Remove OAuth tenant code.

* Include docs fix

* Include `retired_email_addresses`.
  • Loading branch information
jcook-stytch authored Jul 26, 2024
1 parent b647eb2 commit e8b5ae9
Show file tree
Hide file tree
Showing 27 changed files with 440 additions and 157 deletions.
2 changes: 0 additions & 2 deletions stytch/b2b/api/magic_links_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ def invite(
"""Send an invite email to a new Member to join an Organization. The Member will be created with an `invited` status until they successfully authenticate. Sending invites to `pending` Members will update their status to `invited`. Sending invites to already `active` Members will return an error.
The magic link invite will be valid for 1 week.
/%}
Fields:
- organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
Expand Down Expand Up @@ -236,7 +235,6 @@ async def invite_async(
"""Send an invite email to a new Member to join an Organization. The Member will be created with an `invited` status until they successfully authenticate. Sending invites to `pending` Members will update their status to `invited`. Sending invites to already `active` Members will return an error.
The magic link invite will be valid for 1 week.
/%}
Fields:
- organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
Expand Down
28 changes: 2 additions & 26 deletions stytch/b2b/api/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,18 +347,6 @@ def update(
*See the [Organization authentication settings](https://stytch.com/docs/b2b/api/org-auth-settings) resource to learn more about fields like `email_jit_provisioning`, `email_invites`, `sso_jit_provisioning`, etc., and their behaviors.
Our RBAC implementation offers out-of-the-box handling of authorization checks for this endpoint. If you pass in
a header containing a `session_token` or a `session_jwt` for an unexpired Member Session, we will check that the
Member Session has the necessary permissions. The specific permissions needed depend on which of the optional fields
are passed in the request. For example, if the `organization_name` argument is provided, the Member Session must have
permission to perform the `update.info.name` action on the `stytch.organization` Resource.
If the Member Session does not contain a Role that satisfies the requested permissions, or if the Member's Organization
does not match the `organization_id` passed in the request, a 403 error will be thrown. Otherwise, the request will
proceed as normal.
To learn more about our RBAC implementation, see our [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/overview).
Fields:
- organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
- organization_name: The name of the Organization. Must be between 1 and 128 characters in length.
Expand Down Expand Up @@ -530,18 +518,6 @@ async def update_async(
*See the [Organization authentication settings](https://stytch.com/docs/b2b/api/org-auth-settings) resource to learn more about fields like `email_jit_provisioning`, `email_invites`, `sso_jit_provisioning`, etc., and their behaviors.
Our RBAC implementation offers out-of-the-box handling of authorization checks for this endpoint. If you pass in
a header containing a `session_token` or a `session_jwt` for an unexpired Member Session, we will check that the
Member Session has the necessary permissions. The specific permissions needed depend on which of the optional fields
are passed in the request. For example, if the `organization_name` argument is provided, the Member Session must have
permission to perform the `update.info.name` action on the `stytch.organization` Resource.
If the Member Session does not contain a Role that satisfies the requested permissions, or if the Member's Organization
does not match the `organization_id` passed in the request, a 403 error will be thrown. Otherwise, the request will
proceed as normal.
To learn more about our RBAC implementation, see our [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/overview).
Fields:
- organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
- organization_name: The name of the Organization. Must be between 1 and 128 characters in length.
Expand Down Expand Up @@ -691,7 +667,7 @@ def delete(
organization_id: str,
method_options: Optional[DeleteRequestOptions] = None,
) -> DeleteResponse:
"""Deletes an Organization specified by `organization_id`. All Members of the Organization will also be deleted. /%}
"""Deletes an Organization specified by `organization_id`. All Members of the Organization will also be deleted.
Fields:
- organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
Expand All @@ -712,7 +688,7 @@ async def delete_async(
organization_id: str,
method_options: Optional[DeleteRequestOptions] = None,
) -> DeleteResponse:
"""Deletes an Organization specified by `organization_id`. All Members of the Organization will also be deleted. /%}
"""Deletes an Organization specified by `organization_id`. All Members of the Organization will also be deleted.
Fields:
- organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value.
Expand Down
Loading

0 comments on commit e8b5ae9

Please sign in to comment.