Skip to main content

TokenAuthEngine

Trait TokenAuthEngine 

Source
pub trait TokenAuthEngine {
    type Error;

    // Required methods
    fn initial(&mut self) -> Result<TokenStep, Self::Error>;
    fn step(&mut self, peer_token: &[u8]) -> Result<TokenStep, Self::Error>;
}
Expand description

Platform-neutral token exchange consumed by the typed authentication loop.

Required Associated Types§

Source

type Error

Platform-specific credential, mechanism, or verification error.

Required Methods§

Source

fn initial(&mut self) -> Result<TokenStep, Self::Error>

Produces the first token, if the selected mechanism requires one.

§Errors

Returns a platform-specific credential or mechanism error.

Source

fn step(&mut self, peer_token: &[u8]) -> Result<TokenStep, Self::Error>

Processes one peer token and either continues or completes authentication.

§Errors

Returns a platform-specific validation or credential error.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§