Skip to main content

auths_cli/services/providers/
mod.rs

1pub mod github;
2
3use anyhow::Result;
4
5use crate::ux::format::Output;
6use auths_core::signing::PassphraseProvider;
7
8pub struct PlatformAuth {
9    pub username: String,
10    pub proof_url: String,
11}
12
13pub struct ClaimContext<'a> {
14    pub out: &'a Output,
15    pub controller_did: &'a str,
16    pub key_alias: &'a str,
17    pub passphrase_provider: &'a dyn PassphraseProvider,
18    pub http_client: &'a reqwest::Client,
19}
20
21pub trait PlatformClaimProvider {
22    fn platform_name(&self) -> &'static str;
23    fn authenticate_and_publish(&self, ctx: &ClaimContext) -> Result<PlatformAuth>;
24}