Skip to main content

AuthForgeConfig

Struct AuthForgeConfig 

Source
pub struct AuthForgeConfig {
    pub app_id: String,
    pub app_secret: String,
    pub public_key: String,
    pub public_keys: Vec<String>,
    pub heartbeat_mode: HeartbeatMode,
    pub heartbeat_interval: u64,
    pub api_base_url: String,
    pub on_failure: Option<Box<FailureCallback>>,
    pub request_timeout: u64,
    pub heartbeat_request_timeout: Option<u64>,
    pub session_ttl_seconds: Option<u64>,
    pub hwid_override: Option<String>,
}

Fields§

§app_id: String§app_secret: String§public_key: String

Trusted Ed25519 public key in base64. Use public_keys instead for rotation set support; public_key remains for the single-key historical contract and is merged into the trust list at construction.

§public_keys: Vec<String>

Optional rotation set. When non-empty its entries are merged ahead of public_key so the SDK trusts both the previous and the current server-side key during a cutover. A signature that matches any entry verifies successfully.

§heartbeat_mode: HeartbeatMode§heartbeat_interval: u64§api_base_url: String§on_failure: Option<Box<FailureCallback>>§request_timeout: u64§heartbeat_request_timeout: Option<u64>

HTTP timeout in seconds for /auth/heartbeat only. Use a value smaller than Self::request_timeout so a stuck heartbeat does not block AuthForgeClient::logout for as long as activation/validate. None or 0 resolves to 8 seconds at runtime.

§session_ttl_seconds: Option<u64>

Requested session token lifetime (seconds) forwarded to /auth/validate. None means “use the server default” (24h today). Server clamps to [3600, 604800]; out-of-range values are silently clamped.

§hwid_override: Option<String>

Trait Implementations§

Source§

impl Default for AuthForgeConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.