pub struct KeyResolver { /* private fields */ }Expand description
Key resolver for handling both direct and delegated key resolution
Implementations§
Source§impl KeyResolver
impl KeyResolver
Sourcepub async fn resolve_sig_key(
&mut self,
sig_key: &SigKey,
auth_settings: &AuthSettings,
instance: Option<&Instance>,
) -> Result<Vec<ResolvedAuth>>
pub async fn resolve_sig_key( &mut self, sig_key: &SigKey, auth_settings: &AuthSettings, instance: Option<&Instance>, ) -> Result<Vec<ResolvedAuth>>
Resolve authentication identifier to concrete authentication information
Returns all matching ResolvedAuth entries. For name hints that match multiple keys, all matches are returned so the caller can try signature verification against each.
§Arguments
sig_key- The signature key identifier to resolveauth_settings- Authentication settings containing auth configurationinstance- Instance for loading delegated trees (required for Delegation sig_key)
Sourcepub async fn resolve_sig_key_with_depth(
&mut self,
sig_key: &SigKey,
auth_settings: &AuthSettings,
instance: Option<&Instance>,
depth: usize,
) -> Result<Vec<ResolvedAuth>>
pub async fn resolve_sig_key_with_depth( &mut self, sig_key: &SigKey, auth_settings: &AuthSettings, instance: Option<&Instance>, depth: usize, ) -> Result<Vec<ResolvedAuth>>
Resolve authentication identifier with recursion depth tracking
This internal method tracks delegation depth to prevent infinite loops and ensures that delegation chains don’t exceed reasonable limits.
Returns all matching ResolvedAuth entries.
Sourcepub fn resolve_direct_key(
&mut self,
hint: &KeyHint,
auth_settings: &AuthSettings,
) -> Result<Vec<ResolvedAuth>>
pub fn resolve_direct_key( &mut self, hint: &KeyHint, auth_settings: &AuthSettings, ) -> Result<Vec<ResolvedAuth>>
Resolve a direct key reference from the main tree’s auth settings
Returns all matching ResolvedAuth entries. For name hints that match multiple keys, all matches are returned so the caller can try signature verification against each.
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the authentication cache
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyResolver
impl RefUnwindSafe for KeyResolver
impl Send for KeyResolver
impl Sync for KeyResolver
impl Unpin for KeyResolver
impl UnwindSafe for KeyResolver
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more