Expand description
Vortex Rust SDK
This crate provides a Rust SDK for the Vortex authentication and invitation management platform.
§Features
- Generate JWTs compatible with React providers
- Full API integration for invitation management
- Async/await support with tokio
- Type-safe API with comprehensive error handling
§Example
use vortex_sdk::{VortexClient, Identifier, Group};
#[tokio::main]
async fn main() {
let client = VortexClient::new(std::env::var("VORTEX_API_KEY").unwrap());
// Generate a JWT
let jwt = client.generate_jwt(
"user-123",
vec![Identifier::new("email", "user@example.com")],
vec![Group::new("team", "team-1", "Engineering")],
Some("admin")
).unwrap();
println!("JWT: {}", jwt);
// Get invitations
let invitations = client
.get_invitations_by_target("email", "user@example.com")
.await
.unwrap();
println!("Found {} invitations", invitations.len());
}Structs§
- Group
- Group information
- Identifier
- Identifier for a user (email, sms, etc.)
- Invitation
- Full invitation details
- Invitation
Acceptance - Invitation acceptance information
- Invitation
Target - Invitation target (email or sms)
- Invitations
Response - Response containing multiple invitations
- Vortex
Client - Vortex Rust SDK Client
Enums§
- Vortex
Error - Error types for Vortex SDK operations