pub struct AuthClientBuilder { /* private fields */ }Expand description
Builder for the AuthClient.
Implementations§
Source§impl AuthClientBuilder
impl AuthClientBuilder
Sourcepub fn identity(self, identity: ArcIdentity) -> Self
pub fn identity(self, identity: ArcIdentity) -> Self
An optional identity to use as the base. If not provided, an Ed25519 key pair will be used.
Sourcepub fn storage(self, storage: AuthClientStorageType) -> Self
pub fn storage(self, storage: AuthClientStorageType) -> Self
Optional storage with get, set, and remove methods. Currentry only LocalStorage is supported.
Sourcepub fn key_type(self, key_type: BaseKeyType) -> Self
pub fn key_type(self, key_type: BaseKeyType) -> Self
The type of key to use for the base key. If not provided, Ed25519 will be used by default.
Sourcepub fn idle_options(self, idle_options: IdleOptions) -> Self
pub fn idle_options(self, idle_options: IdleOptions) -> Self
Options for handling idle timeouts. If not provided, default options will be used.
Sourcepub fn disable_idle(self, disable_idle: bool) -> Self
pub fn disable_idle(self, disable_idle: bool) -> Self
If set to true, disables the idle timeout functionality.
Sourcepub fn disable_default_idle_callback(
self,
disable_default_idle_callback: bool,
) -> Self
pub fn disable_default_idle_callback( self, disable_default_idle_callback: bool, ) -> Self
If set to true, disables the default idle timeout callback.
Sourcepub fn idle_manager_options(
self,
idle_manager_options: IdleManagerOptions,
) -> Self
pub fn idle_manager_options( self, idle_manager_options: IdleManagerOptions, ) -> Self
Options for the IdleManager that handles idle timeouts.
Sourcepub fn on_idle(self, on_idle: fn()) -> Self
pub fn on_idle(self, on_idle: fn()) -> Self
A callback function to be executed when the system becomes idle.
Note: This replaces any existing callbacks. Use add_on_idle for multiple.
Sourcepub fn add_on_idle<F>(self, on_idle: F) -> Self
pub fn add_on_idle<F>(self, on_idle: F) -> Self
Adds a callback function to be executed when the system becomes idle.
Sourcepub fn idle_timeout(self, idle_timeout: u32) -> Self
pub fn idle_timeout(self, idle_timeout: u32) -> Self
The duration of inactivity after which the system is considered idle.
Sourcepub fn scroll_debounce(self, scroll_debounce: u32) -> Self
pub fn scroll_debounce(self, scroll_debounce: u32) -> Self
A delay for debouncing scroll events.
Sourcepub fn capture_scroll(self, capture_scroll: bool) -> Self
pub fn capture_scroll(self, capture_scroll: bool) -> Self
A flag indicating whether to capture scroll events.
Sourcepub async fn build(self) -> Result<AuthClient, DelegationError>
pub async fn build(self) -> Result<AuthClient, DelegationError>
Builds a new AuthClient.