ic_auth_client/option/native.rs
1//! Native authentication client configuration and options.
2
3use crate::{ArcIdentity, IdleOptions, key::BaseKeyType, storage::sync_storage::AuthClientStorage};
4
5/// Options for creating a new [`NativeAuthClient`].
6#[derive(bon::Builder)]
7pub struct NativeAuthClientCreateOptions {
8 /// An optional identity to use as the base. If not provided, an `Ed25519` key pair will be used.
9 pub identity: Option<ArcIdentity>,
10 /// Storage with get, set, and remove methods.
11 #[builder(into)]
12 pub storage: Box<dyn AuthClientStorage>,
13 /// The type of key to use for the base key. If not provided, `Ed25519` will be used by default.
14 pub key_type: Option<BaseKeyType>,
15 /// Options for handling idle timeouts. If not provided, default options will be used.
16 pub idle_options: Option<IdleOptions>,
17}