Skip to main content

Crate usso

Crate usso 

Source
Expand description

§USSO-RS

Universal Single Sign-On (SSO) client for Rust microservices.

Authenticate users, validate JWTs, check authorization scopes, and manage sessions against the USSO identity platform.

§Quick Start

use usso::core::Usso;

let usso = Usso::new(None, Some("https://sso.usso.io/website/jwks.json".into()), None);
let user = usso.user_data_from_token("eyJ...");

§Feature flags

FlagDefaultDescription
axumdisabledEnables [integrations::axum] — FromRequestParts extractors for axum

§Modules

ModuleDescription
coreJWT decoding, Usso and UssoAuth auth orchestrators
configAuthConfig, HeaderConfig, APIHeaderConfig configuration types
jwksJWKS fetching (sync/async) with global caching
authorizationScope-based RBAC engine (includes owner_authorization, broadest_scope_filter, get_common_scopes)
integrationsFramework integrations (axum behind the axum feature)
clientFull API client with session management (sync + async)
sessionLightweight session wrapper
schemasData types: UserData, Jwk (RSA + EC), Jwks, UserResponse
exceptionsError types
utilsAgent JWT generation and base64↔UUID utilities

Modules§

authorization
Scope-based authorization (RBAC) engine.
client
Full-featured API clients for interacting with the USSO backend.
config
Configuration types for JWT and API key extraction.
core
Core JWT decoding and authentication orchestration.
exceptions
Error types for the USSO client.
integrations
Framework integrations for web frameworks.
jwks
JWKS (JSON Web Key Set) fetching and caching.
schemas
Data types used throughout the crate.
session
Lightweight session wrappers for basic USSO API access.
utils
Utility modules for agent JWT generation and base64↔UUID conversion.