pub trait Challenger: Send + Sync {
// Required method
fn challenge(
&self,
request: ChallengeRequest,
) -> Result<Challenge, ProviderError>;
}Expand description
Issues what a method needs before it can be answered: for a passkey, a challenge the signed answer is bound to.
A separate kind because a challenged sign-in is two calls and
Authenticator::authenticate is one: appending a method to that kind would refuse every
provider already built. The answer goes through authenticate with
Attempt::challenge set to what Challenge::challenge said.
A consumer builds one instance per kind, so a challenge issued by one instance must be
found by the other: a provider keeps it in a table both read, never in memory.
Required Methods§
Sourcefn challenge(
&self,
request: ChallengeRequest,
) -> Result<Challenge, ProviderError>
fn challenge( &self, request: ChallengeRequest, ) -> Result<Challenge, ProviderError>
Makes a challenge for one sign-in. GUATIAO_ERR_UNSUPPORTED for a method the provider
does not challenge, GUATIAO_ERR_NOT_FOUND for a named account it cannot challenge, and
error::busy when the source holds too many already.
Trait Implementations§
Source§impl From<Instance<dyn Challenger>> for Box<dyn Challenger>
impl From<Instance<dyn Challenger>> for Box<dyn Challenger>
Source§fn from(instance: Instance<dyn Challenger>) -> Self
fn from(instance: Instance<dyn Challenger>) -> Self
Source§impl From<Remote<dyn Challenger>> for Box<dyn Challenger>
impl From<Remote<dyn Challenger>> for Box<dyn Challenger>
Source§fn from(remote: Remote<dyn Challenger>) -> Self
fn from(remote: Remote<dyn Challenger>) -> Self
Source§impl Kind for dyn Challenger
impl Kind for dyn Challenger
Source§const NAME: &'static str = "coqui_challenger"
const NAME: &'static str = "coqui_challenger"
kinds and tables.Source§const FLOOR: usize
const FLOOR: usize
Kind::Vtable]: every slot. A table declaring less is
refused; a larger one has slots appended after these.Source§const FLOOR_HASH: u32 = ChallengerVtable::FLOOR_HASH
const FLOOR_HASH: u32 = ChallengerVtable::FLOOR_HASH
Source§const REQUIRED: &'static [(&'static str, usize)]
const REQUIRED: &'static [(&'static str, usize)]
(method name, one past its end), so a
null one is refused by name.Source§const OBJECT: bool = false
const OBJECT: bool = false
#[guatiao::kind(object)]): a
handle one caller owns, with a destroy slot first and &mut self
methods, never offered by a registry. See [Object]. Read moreSource§fn as_dyn(remote: &Remote<Self>) -> &Self
fn as_dyn(remote: &Remote<Self>) -> &Self
remote, because
only it knows the trait.Source§fn as_dyn_mut(remote: &mut Remote<Self>) -> &mut Self
fn as_dyn_mut(remote: &mut Remote<Self>) -> &mut Self
Object] hands out.Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".