pub struct AuthConfig {
pub role: AuthRole,
pub account_id: [u8; 32],
pub local_node: [u8; 32],
pub remote_node: [u8; 32],
pub policy: AuthPolicy,
pub now_ms: i64,
pub pre_auth_timeout: Duration,
}Expand description
The non-stream inputs to one auth handshake, bundled so run_auth_phase takes the stream
pair, the authorizer, and this — rather than a long argument train.
Fields§
§role: AuthRoleWhich end this peer is (sets the send/verify order).
account_id: [u8; 32]The account this session is scoped to (named in our own auth frame).
local_node: [u8; 32]Our own transport node id (bound into the binding we present).
remote_node: [u8; 32]The peer’s iroh-authenticated transport node id (checked against the binding it presents).
policy: AuthPolicyHow we admit the peer.
now_ms: i64The CURRENT wall-clock (ms) for this handshake — used to stamp the binding we mint and to check the peer’s binding freshness. Per-handshake, NOT a store-construction timestamp: a reused store would otherwise mint stale bindings and never advance the replay window.
pre_auth_timeout: DurationHow long we wait for the peer’s auth frame before aborting.
Trait Implementations§
Source§impl Clone for AuthConfig
impl Clone for AuthConfig
Source§fn clone(&self) -> AuthConfig
fn clone(&self) -> AuthConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AuthConfig
Auto Trait Implementations§
impl Freeze for AuthConfig
impl RefUnwindSafe for AuthConfig
impl Send for AuthConfig
impl Sync for AuthConfig
impl Unpin for AuthConfig
impl UnsafeUnpin for AuthConfig
impl UnwindSafe for AuthConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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