pub struct ServerId(/* private fields */);Expand description
A server’s id, as ServerId::parse checked it.
Implementations§
Source§impl ServerId
impl ServerId
Sourcepub fn from_bytes(bytes: [u8; 10]) -> Self
pub fn from_bytes(bytes: [u8; 10]) -> Self
The id written for bytes: the server makes them at random.
Sourcepub fn parse(id: &str) -> Result<Self, InvalidServerId>
pub fn parse(id: &str) -> Result<Self, InvalidServerId>
id if it is a server id as ServerId::from_bytes writes one:
16 characters of the alphabet. Anything else, uppercase too, is
refused: a server id names a relying party, and one id has one
spelling.
pub fn as_str(&self) -> &str
Sourcepub fn rp_id(&self) -> String
pub fn rp_id(&self) -> String
The relying party of this server’s app passkeys:
<id>.APP_RP_DOMAIN. A security key keeps passkeys apart by
relying party, so one with passkeys for two servers offers only
this server’s.
Sourcepub fn origin(&self) -> String
pub fn origin(&self) -> String
The origin the platform writes into clientDataJSON for
ServerId::rp_id: https://<id>.spoolframe.app. WebAuthn wants
the origin’s host to be the relying party or under it, so it is
never https://spoolframe.app.
Trait Implementations§
impl Eq for ServerId
impl StructuralPartialEq for ServerId
Auto Trait Implementations§
impl Freeze for ServerId
impl RefUnwindSafe for ServerId
impl Send for ServerId
impl Sync for ServerId
impl Unpin for ServerId
impl UnsafeUnpin for ServerId
impl UnwindSafe for ServerId
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