junobuild_auth/
strategies.rs1use crate::state::types::state::AuthenticationHeapState;
2use ic_certification::Hash;
3use junobuild_shared::types::state::Controllers;
4
5pub trait AuthHeapStrategy {
6 fn with_auth_state<R>(&self, f: impl FnOnce(&Option<AuthenticationHeapState>) -> R) -> R;
7
8 fn with_auth_state_mut<R>(
9 &self,
10 f: impl FnOnce(&mut Option<AuthenticationHeapState>) -> R,
11 ) -> R;
12}
13
14pub trait AuthCertificateStrategy {
15 fn update_certified_data(&self);
16
17 fn get_asset_hashes_root_hash(&self) -> Hash;
18}
19
20pub trait AuthAutomationStrategy {
21 fn get_controllers(&self) -> Controllers;
22}