Expand description
§systemprompt-users
User management for the systemprompt.io AI governance platform. The crate provides:
- 6-tier RBAC — typed
UserRoleand policy-aware promotion/demotion helpers inUserAdminService. - Sessions — lifecycle management for browser, API, and anonymous sessions including bulk-end and recent-activity queries.
- API keys — issuance, hashing, and verification via
ApiKeyService. - Device certificates — enrollment and rotation via
DeviceCertService. - IP bans — typed
BannedIpRepositorywith metadata-aware queries. - Cleanup job — purges anonymous users past the retention window.
§Feature flags
| Feature | Default | Effect |
|---|---|---|
| none | n/a | The crate exposes a single feature surface; all modules are compiled unconditionally. The [package.metadata.docs.rs] all-features = true setting is retained so future feature additions automatically appear in published docs. |
§Layering
systemprompt-users is a domain crate. It depends downward on
systemprompt-database, systemprompt-extension, systemprompt-models,
systemprompt-traits, systemprompt-provider-contracts, and
systemprompt-identifiers.
Re-exports§
pub use error::Result;pub use error::UserError;pub use error::UserResult;
Modules§
Structs§
- ApiKey
Service - BanIp
Params - BanIp
With Metadata Params - Banned
Ip - Banned
IpRepository - Create
ApiKey Params - Device
Cert Service - Enroll
Device Cert Params - Enroll
Device Cert Service Params - Issue
ApiKey Params - Merge
Result - NewApi
Key - Update
User Params - User
- User
Activity - User
Admin Service - User
ApiKey - User
Count Breakdown - User
Device Cert - User
Export - User
Provider Impl - User
Repository - User
Service - User
Session - User
Stats - User
With Sessions - Users
Extension