Skip to content

Commit

Permalink
Add allowed OAuth Tenants (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-stytch authored Aug 14, 2024
2 parents a8541fd + 6735776 commit 7c3bde0
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "stytch"
version = "4.0.0"
version = "4.1.0"
edition = "2021"
license = "MIT"
description = "Stytch Rust client"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The minimum supported Rust version (MSRV) of this library is Rust 1.70.
Use `cargo add stytch` to add this to your `Cargo.toml`:

```toml
stytch = "4.0.0"
stytch = "4.1.0"
```

## Usage
Expand Down
11 changes: 11 additions & 0 deletions src/b2b/discovery_organizations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,17 @@ pub struct CreateRequest {
/// The list's accepted values are: `sms_otp` and `totp`.
///
pub allowed_mfa_methods: std::option::Option<std::vec::Vec<String>>,
/// oauth_tenant_jit_provisioning: The authentication setting that controls how a new Member can JIT
/// provision into an organization by tenant. The accepted values are:
///
/// `RESTRICTED` – only new Members with tenants in `allowed_oauth_tenants` can JIT provision via tenant.
///
/// `NOT_ALLOWED` – disable JIT provisioning by OAuth Tenant.
///
pub oauth_tenant_jit_provisioning: std::option::Option<String>,
/// allowed_oauth_tenants: A map of allowed OAuth tenants. If this field is not passed in, the Organization
/// will not allow JIT provisioning by OAuth Tenant. Allowed keys are "slack" and "hubspot".
pub allowed_oauth_tenants: std::option::Option<serde_json::Value>,
}
/// CreateResponse: Response type for `Organizations.create`.
#[derive(Serialize, Deserialize, Debug, Clone)]
Expand Down
41 changes: 41 additions & 0 deletions src/b2b/organizations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,14 @@ pub struct Organization {
/// The list's accepted values are: `sms_otp` and `totp`.
///
pub allowed_mfa_methods: std::vec::Vec<String>,
/// oauth_tenant_jit_provisioning: The authentication setting that controls how a new Member can JIT
/// provision into an organization by tenant. The accepted values are:
///
/// `RESTRICTED` – only new Members with tenants in `allowed_oauth_tenants` can JIT provision via tenant.
///
/// `NOT_ALLOWED` – disable JIT provisioning by OAuth Tenant.
///
pub oauth_tenant_jit_provisioning: String,
/// trusted_metadata: An arbitrary JSON object for storing application-specific data or
/// identity-provider-specific data.
pub trusted_metadata: std::option::Option<serde_json::Value>,
Expand All @@ -362,6 +370,9 @@ pub struct Organization {
/// scim_active_connection: An active
/// [SCIM Connection references](https://stytch.com/docs/b2b/api/scim-connection-object).
pub scim_active_connection: std::option::Option<ActiveSCIMConnection>,
/// allowed_oauth_tenants: A map of allowed OAuth tenants. If this field is not passed in, the Organization
/// will not allow JIT provisioning by OAuth Tenant. Allowed keys are "slack" and "hubspot".
pub allowed_oauth_tenants: std::option::Option<serde_json::Value>,
}
/// ResultsMetadata:
#[derive(Serialize, Deserialize, Debug, Clone)]
Expand Down Expand Up @@ -517,6 +528,17 @@ pub struct CreateRequest {
/// The list's accepted values are: `sms_otp` and `totp`.
///
pub allowed_mfa_methods: std::option::Option<std::vec::Vec<String>>,
/// oauth_tenant_jit_provisioning: The authentication setting that controls how a new Member can JIT
/// provision into an organization by tenant. The accepted values are:
///
/// `RESTRICTED` – only new Members with tenants in `allowed_oauth_tenants` can JIT provision via tenant.
///
/// `NOT_ALLOWED` – disable JIT provisioning by OAuth Tenant.
///
pub oauth_tenant_jit_provisioning: std::option::Option<String>,
/// allowed_oauth_tenants: A map of allowed OAuth tenants. If this field is not passed in, the Organization
/// will not allow JIT provisioning by OAuth Tenant. Allowed keys are "slack" and "hubspot".
pub allowed_oauth_tenants: std::option::Option<serde_json::Value>,
}
/// CreateResponse: Response type for `Organizations.create`.
#[derive(Serialize, Deserialize, Debug, Clone)]
Expand Down Expand Up @@ -793,6 +815,25 @@ pub struct UpdateRequest {
/// permission to perform the `update.settings.allowed-mfa-methods` action on the `stytch.organization`
/// Resource.
pub allowed_mfa_methods: std::option::Option<std::vec::Vec<String>>,
/// oauth_tenant_jit_provisioning: The authentication setting that controls how a new Member can JIT
/// provision into an organization by tenant. The accepted values are:
///
/// `RESTRICTED` – only new Members with tenants in `allowed_oauth_tenants` can JIT provision via tenant.
///
/// `NOT_ALLOWED` – disable JIT provisioning by OAuth Tenant.
///
///
/// If this field is provided and a session header is passed into the request, the Member Session must have
/// permission to perform the `update.settings.oauth-tenant-jit-provisioning` action on the
/// `stytch.organization` Resource.
pub oauth_tenant_jit_provisioning: std::option::Option<String>,
/// allowed_oauth_tenants: A map of allowed OAuth tenants. If this field is not passed in, the Organization
/// will not allow JIT provisioning by OAuth Tenant. Allowed keys are "slack" and "hubspot".
///
/// If this field is provided and a session header is passed into the request, the Member Session must have
/// permission to perform the `update.settings.allowed-oauth-tenants` action on the `stytch.organization`
/// Resource.
pub allowed_oauth_tenants: std::option::Option<serde_json::Value>,
}
/// UpdateResponse: Response type for `Organizations.update`.
#[derive(Serialize, Deserialize, Debug, Clone)]
Expand Down

0 comments on commit 7c3bde0

Please sign in to comment.