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, User};
#[tokio::main]
async fn main() {
let client = VortexClient::new(std::env::var("VORTEX_API_KEY").unwrap());
// Generate a JWT
let user = User::new("user-123", "user@example.com")
.with_admin_scopes(vec!["autojoin".to_string()]);
let jwt = client.generate_jwt(&user, None).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 for JWT generation (input) Supports both ‘id’ (legacy) and ‘groupId’ (preferred) for backward compatibility
- Identifier
- Identifier for a user (email, sms, etc.)
- Invitation
- Full invitation details
- Invitation
Acceptance - Invitation acceptance information
- Invitation
Group - Invitation group from API responses This matches the MemberGroups table structure from the API
- Invitation
Target - Invitation target (email or sms)
- Invitations
Response - Response containing multiple invitations
- User
- User type for JWT generation
- Vortex
Client - Vortex Rust SDK Client
Enums§
- Vortex
Error - Error types for Vortex SDK operations