Trait geph4_protocol::binder::protocol::BinderProtocol
source · [−]pub trait BinderProtocol {
fn authenticate<'life0, 'async_trait>(
&'life0 self,
auth_req: AuthRequest
) -> Pin<Box<dyn Future<Output = Result<AuthResponse, AuthError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn validate<'life0, 'async_trait>(
&'life0 self,
token: BlindToken
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_captcha<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Captcha, MiscFatalError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn register_user<'life0, 'async_trait>(
&'life0 self,
username: SmolStr,
password: SmolStr,
captcha_id: SmolStr,
captcha_soln: SmolStr
) -> Pin<Box<dyn Future<Output = Result<(), RegisterError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn delete_user<'life0, 'async_trait>(
&'life0 self,
username: SmolStr,
password: SmolStr
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn add_bridge_route<'life0, 'async_trait>(
&'life0 self,
descriptor: BridgeDescriptor
) -> Pin<Box<dyn Future<Output = Result<(), MiscFatalError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_summary<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = MasterSummary> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_bridges<'life0, 'async_trait>(
&'life0 self,
token: BlindToken,
exit: SmolStr
) -> Pin<Box<dyn Future<Output = Vec<BridgeDescriptor>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_mizaru_pk<'life0, 'async_trait>(
&'life0 self,
level: Level
) -> Pin<Box<dyn Future<Output = PublicKey> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_mizaru_epoch_key<'life0, 'async_trait>(
&'life0 self,
level: Level,
epoch: u16
) -> Pin<Box<dyn Future<Output = RSAPublicKey> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}Required Methods
sourcefn authenticate<'life0, 'async_trait>(
&'life0 self,
auth_req: AuthRequest
) -> Pin<Box<dyn Future<Output = Result<AuthResponse, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn authenticate<'life0, 'async_trait>(
&'life0 self,
auth_req: AuthRequest
) -> Pin<Box<dyn Future<Output = Result<AuthResponse, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Authenticates a 24-hour-long session for a user.
sourcefn validate<'life0, 'async_trait>(
&'life0 self,
token: BlindToken
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn validate<'life0, 'async_trait>(
&'life0 self,
token: BlindToken
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Validates a blind signature token, applying rate-limiting as appropriate
sourcefn get_captcha<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Captcha, MiscFatalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_captcha<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Captcha, MiscFatalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Obtains a unique captcha, for user registry.
sourcefn register_user<'life0, 'async_trait>(
&'life0 self,
username: SmolStr,
password: SmolStr,
captcha_id: SmolStr,
captcha_soln: SmolStr
) -> Pin<Box<dyn Future<Output = Result<(), RegisterError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn register_user<'life0, 'async_trait>(
&'life0 self,
username: SmolStr,
password: SmolStr,
captcha_id: SmolStr,
captcha_soln: SmolStr
) -> Pin<Box<dyn Future<Output = Result<(), RegisterError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Registers a new user.
sourcefn delete_user<'life0, 'async_trait>(
&'life0 self,
username: SmolStr,
password: SmolStr
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn delete_user<'life0, 'async_trait>(
&'life0 self,
username: SmolStr,
password: SmolStr
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Deletes a user.
sourcefn add_bridge_route<'life0, 'async_trait>(
&'life0 self,
descriptor: BridgeDescriptor
) -> Pin<Box<dyn Future<Output = Result<(), MiscFatalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn add_bridge_route<'life0, 'async_trait>(
&'life0 self,
descriptor: BridgeDescriptor
) -> Pin<Box<dyn Future<Output = Result<(), MiscFatalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Adds a bridge route.
sourcefn get_summary<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = MasterSummary> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_summary<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = MasterSummary> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Obtains the master summary of the network state.
sourcefn get_bridges<'life0, 'async_trait>(
&'life0 self,
token: BlindToken,
exit: SmolStr
) -> Pin<Box<dyn Future<Output = Vec<BridgeDescriptor>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_bridges<'life0, 'async_trait>(
&'life0 self,
token: BlindToken,
exit: SmolStr
) -> Pin<Box<dyn Future<Output = Vec<BridgeDescriptor>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Obtains a list of bridges.
sourcefn get_mizaru_pk<'life0, 'async_trait>(
&'life0 self,
level: Level
) -> Pin<Box<dyn Future<Output = PublicKey> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_mizaru_pk<'life0, 'async_trait>(
&'life0 self,
level: Level
) -> Pin<Box<dyn Future<Output = PublicKey> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Obtains the Mizaru long-term key.
sourcefn get_mizaru_epoch_key<'life0, 'async_trait>(
&'life0 self,
level: Level,
epoch: u16
) -> Pin<Box<dyn Future<Output = RSAPublicKey> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_mizaru_epoch_key<'life0, 'async_trait>(
&'life0 self,
level: Level,
epoch: u16
) -> Pin<Box<dyn Future<Output = RSAPublicKey> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Obtains a Mizaru epoch key.