#[non_exhaustive]pub struct ChallengeReply {
pub signed_challenge: Bytes,
pub public_key_pem: String,
/* private fields */
}Expand description
A reply to a challenge signed by a 2FA key.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.signed_challenge: BytesRequired. The signed challenge associated with the 2FA key. The signature must be RSASSA-PKCS1 v1.5 with a SHA256 digest.
public_key_pem: StringRequired. The public key associated with the 2FA key.
Implementations§
Source§impl ChallengeReply
impl ChallengeReply
pub fn new() -> Self
Sourcepub fn set_signed_challenge<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_signed_challenge<T: Into<Bytes>>(self, v: T) -> Self
Sets the value of signed_challenge.
§Example
ⓘ
let x = ChallengeReply::new().set_signed_challenge(bytes::Bytes::from_static(b"example"));Sourcepub fn set_public_key_pem<T: Into<String>>(self, v: T) -> Self
pub fn set_public_key_pem<T: Into<String>>(self, v: T) -> Self
Sets the value of public_key_pem.
§Example
ⓘ
let x = ChallengeReply::new().set_public_key_pem("example");Trait Implementations§
Source§impl Clone for ChallengeReply
impl Clone for ChallengeReply
Source§fn clone(&self) -> ChallengeReply
fn clone(&self) -> ChallengeReply
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChallengeReply
impl Debug for ChallengeReply
Source§impl Default for ChallengeReply
impl Default for ChallengeReply
Source§fn default() -> ChallengeReply
fn default() -> ChallengeReply
Returns the “default value” for a type. Read more
Source§impl Message for ChallengeReply
impl Message for ChallengeReply
Source§impl PartialEq for ChallengeReply
impl PartialEq for ChallengeReply
impl StructuralPartialEq for ChallengeReply
Auto Trait Implementations§
impl !Freeze for ChallengeReply
impl RefUnwindSafe for ChallengeReply
impl Send for ChallengeReply
impl Sync for ChallengeReply
impl Unpin for ChallengeReply
impl UnsafeUnpin for ChallengeReply
impl UnwindSafe for ChallengeReply
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