pub struct NamespaceVerificationSession {
pub challenge: VerificationChallenge,
pub ecosystem: Ecosystem,
pub package_name: PackageName,
pub controller_did: CanonicalDid,
pub platform: PlatformContext,
}Expand description
An in-progress namespace verification session.
Returned by initiate_namespace_claim. The CLI displays the challenge
instructions, waits for user confirmation, then calls complete.
Usage:
ⓘ
let session = initiate_namespace_claim(&verifier, eco, pkg, did, platform).await?;
println!("{}", session.challenge.instructions);
// wait for user...
let result = session.complete(&verifier, &signer, &passphrase, &alias).await?;Fields§
§challenge: VerificationChallengeThe verification challenge issued by the adapter.
ecosystem: EcosystemThe ecosystem being verified.
package_name: PackageNameThe package being claimed.
controller_did: CanonicalDidThe DID claiming ownership.
platform: PlatformContextPlatform identity context for cross-referencing.
Implementations§
Source§impl NamespaceVerificationSession
impl NamespaceVerificationSession
Sourcepub async fn complete_ref(
&self,
now: DateTime<Utc>,
verifier: &dyn NamespaceVerifier,
signer: &dyn SecureSigner,
passphrase_provider: &dyn PassphraseProvider,
signer_alias: &KeyAlias,
) -> Result<VerifiedClaimResult, NamespaceError>
pub async fn complete_ref( &self, now: DateTime<Utc>, verifier: &dyn NamespaceVerifier, signer: &dyn SecureSigner, passphrase_provider: &dyn PassphraseProvider, signer_alias: &KeyAlias, ) -> Result<VerifiedClaimResult, NamespaceError>
Complete the verification after the user has performed the challenge.
Borrows self so the caller can retry on transient failures.
Calls verifier.verify(), then signs the namespace claim entry
with the proof attached.
Args:
now: Current time (injected at presentation boundary).verifier: The namespace verifier adapter.signer: Signing backend for creating the cryptographic signature.passphrase_provider: Provider for obtaining key decryption passphrases.signer_alias: Keychain alias of the signing key.
Auto Trait Implementations§
impl Freeze for NamespaceVerificationSession
impl RefUnwindSafe for NamespaceVerificationSession
impl Send for NamespaceVerificationSession
impl Sync for NamespaceVerificationSession
impl Unpin for NamespaceVerificationSession
impl UnsafeUnpin for NamespaceVerificationSession
impl UnwindSafe for NamespaceVerificationSession
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more