ZITADEL Rust

This repository contains the gRPC bindings for ZITADEL and other helpers to interact with the ZITADEL API.

With the help of the service account it is possible to access the ZITADEL API and use the management client to execute gRPC calls against the API.

Example

Fetch the first 1000 users in the organization of a service account:

```rust use zitadel::credentials::ServiceAccount; use zitadel::grpc::zitadel::management::v1::managementserviceclient::ManagementServiceClient;

[tokio::main]

async fn main() { let serviceaccount = ServiceAccount::loadfromfile("./myjsonkey.json")?; let client = ManagementServiceClient.connect("https://api.zitadel.ch"); let accesstoken = serviceaccount.authenticate().await?; let req = tonic::Request::new(ListUsersRequest { query: Some(ListQuery { offset: progressed as u64, limit: 1000, asc: true, }), sortingcolumn: 0, queries: vec![], }); req.metadatamut() .insert("authorization", format!("Bearer {}", accesstoken) .parse() .unwrap()); let response = client.list_users(req).await?;

Ok(());

} ```

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the package by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.