Requirements
- Rust 1.70 or later
- Crates used by the SDK:
hmacsha2serdeserde_jsonureqbase64mac_addresshostname
Installation
The crate is not on crates.io yet. Add the SDK source via a path (clone, submodule, or copy) or a git dependency.- Path
- Git
vendor/authforge).Quick start
Config struct reference
| Field | Type | Default | Description |
|---|---|---|---|
app_id | String | required | Application ID from your AuthForge dashboard |
app_secret | String | required | Application secret from your AuthForge dashboard |
heartbeat_mode | HeartbeatMode | Local | Local or Server heartbeat mode |
heartbeat_interval | u64 | 900 | Seconds between heartbeat checks |
api_base_url | String | https://auth.authforge.cc | AuthForge API base URL |
on_failure | Option<Box<dyn Fn(&str)+Send+Sync>> | None | Invoked when heartbeat fails |
request_timeout | u64 | 15 | Timeout for API requests |