pub struct AuthenticationResponse { /* private fields */ }Expand description
What the browser posts back after navigator.credentials.get().
Implementations§
Source§impl AuthenticationResponse
impl AuthenticationResponse
pub fn new( id: impl Into<Vec<u8>>, client_data_json: impl Into<Vec<u8>>, authenticator_data: impl Into<Vec<u8>>, signature: impl Into<Vec<u8>>, ) -> AuthenticationResponse
Sourcepub fn with_user_handle(
self,
user_handle: impl Into<Vec<u8>>,
) -> AuthenticationResponse
pub fn with_user_handle( self, user_handle: impl Into<Vec<u8>>, ) -> AuthenticationResponse
The user handle a discoverable credential hands back.
Sourcepub fn from_json(value: &Json) -> Result<AuthenticationResponse>
pub fn from_json(value: &Json) -> Result<AuthenticationResponse>
Read the shape a browser produces from PublicKeyCredential.toJSON().
Sourcepub fn parse(body: &str) -> Result<AuthenticationResponse>
pub fn parse(body: &str) -> Result<AuthenticationResponse>
The same, from the request body directly.
pub fn id(&self) -> &[u8] ⓘ
pub fn client_data_json(&self) -> &[u8] ⓘ
pub fn authenticator_data(&self) -> &[u8] ⓘ
pub fn signature(&self) -> &[u8] ⓘ
pub fn user_handle(&self) -> Option<&[u8]>
Trait Implementations§
Source§impl Clone for AuthenticationResponse
impl Clone for AuthenticationResponse
Auto Trait Implementations§
impl Freeze for AuthenticationResponse
impl RefUnwindSafe for AuthenticationResponse
impl Send for AuthenticationResponse
impl Sync for AuthenticationResponse
impl Unpin for AuthenticationResponse
impl UnsafeUnpin for AuthenticationResponse
impl UnwindSafe for AuthenticationResponse
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