ic-auth-client 0.5.0-beta.0

A client library for Internet Computer identity authentication services.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Native authentication client configuration and options.

use crate::{ArcIdentity, IdleOptions, key::BaseKeyType, storage::sync_storage::AuthClientStorage};

/// Options for creating a new [`NativeAuthClient`].
#[derive(bon::Builder)]
pub struct NativeAuthClientCreateOptions {
    /// An optional identity to use as the base. If not provided, an `Ed25519` key pair will be used.
    pub identity: Option<ArcIdentity>,
    /// Storage with get, set, and remove methods.
    #[builder(into)]
    pub storage: Box<dyn AuthClientStorage>,
    /// The type of key to use for the base key. If not provided, `Ed25519` will be used by default.
    pub key_type: Option<BaseKeyType>,
    /// Options for handling idle timeouts. If not provided, default options will be used.
    pub idle_options: Option<IdleOptions>,
}