Skip to content

Commit

Permalink
Add in additional SCIM Attributes to get parity to spec (#34)
Browse files Browse the repository at this point in the history
Adds in some missing properties for SCIM Attributes.
  • Loading branch information
bgier-stytch authored Aug 16, 2024
2 parents 7c3bde0 + a557efe commit 6a78ace
Show file tree
Hide file tree
Showing 3 changed files with 35 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.1.0"
version = "4.1.1"
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.1.0"
stytch = "4.1.1"
```

## Usage
Expand Down
33 changes: 33 additions & 0 deletions src/b2b/scim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ pub struct EnterpriseExtension {
pub manager: std::option::Option<Manager>,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Entitlement {
pub value: String,
#[serde(rename = "type")]
pub type_: String,
pub primary: bool,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Group {
pub value: String,
pub display: String,
Expand All @@ -45,6 +52,7 @@ pub struct IMs {
pub value: String,
#[serde(rename = "type")]
pub type_: String,
pub primary: bool,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Manager {
Expand All @@ -70,6 +78,20 @@ pub struct PhoneNumber {
pub primary: bool,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Photo {
pub value: String,
#[serde(rename = "type")]
pub type_: String,
pub primary: bool,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Role {
pub value: String,
#[serde(rename = "type")]
pub type_: String,
pub primary: bool,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct SCIMAttributes {
pub user_name: String,
pub id: String,
Expand All @@ -88,6 +110,10 @@ pub struct SCIMAttributes {
pub phone_numbers: std::vec::Vec<PhoneNumber>,
pub addresses: std::vec::Vec<Address>,
pub ims: std::vec::Vec<IMs>,
pub photos: std::vec::Vec<Photo>,
pub entitlements: std::vec::Vec<Entitlement>,
pub roles: std::vec::Vec<Role>,
pub x509certificates: std::vec::Vec<X509Certificate>,
pub name: std::option::Option<Name>,
pub enterprise_extension: std::option::Option<EnterpriseExtension>,
}
Expand Down Expand Up @@ -153,6 +179,13 @@ pub struct SCIMGroupImplicitRoleAssignments {
pub group_id: String,
pub group_name: String,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct X509Certificate {
pub value: String,
#[serde(rename = "type")]
pub type_: String,
pub primary: bool,
}

pub struct SCIM {
pub connection: Connection,
Expand Down

0 comments on commit 6a78ace

Please sign in to comment.