Struct relay_auth::RegisterResponse
source · pub struct RegisterResponse { /* private fields */ }
Expand description
Represents a response to a register challenge.
The response contains the same data as the register challenge. By signing this payload successfully, this Relay authenticates with the upstream.
Implementations§
source§impl RegisterResponse
impl RegisterResponse
sourcepub fn unpack(
data: &[u8],
signature: &str,
secret: &[u8],
max_age: Option<Duration>
) -> Result<(Self, RegisterState), UnpackError>
pub fn unpack( data: &[u8], signature: &str, secret: &[u8], max_age: Option<Duration> ) -> Result<(Self, RegisterState), UnpackError>
Unpacks the register response and validates signatures.
sourcepub fn version(&self) -> RelayVersion
pub fn version(&self) -> RelayVersion
Returns the version of the registering Relay.
Trait Implementations§
source§impl Debug for RegisterResponse
impl Debug for RegisterResponse
source§impl<'de> Deserialize<'de> for RegisterResponse
impl<'de> Deserialize<'de> for RegisterResponse
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RegisterResponse
impl RefUnwindSafe for RegisterResponse
impl Send for RegisterResponse
impl Sync for RegisterResponse
impl Unpin for RegisterResponse
impl UnwindSafe for RegisterResponse
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