pub struct EnrollRequest {
pub name: String,
pub public_key: String,
pub agent: String,
pub authkey: Option<String>,
}Expand description
Body of POST /v1/devices/enroll.
Fields§
§name: StringWhat the owner will see this machine as, such as laptop.
public_key: StringThe device’s Ed25519 public key: 32 bytes, base64url, no padding.
agent: StringThe client’s User-Agent, recorded so the device list can show
which version each machine runs.
authkey: Option<String>An authkey, for a machine that cannot wait for approval. It
is approved at once, with sync scope, and named by the server
rather than by name: nobody approved it, so it may not choose a
name that passes for another machine’s.
Implementations§
Source§impl EnrollRequest
impl EnrollRequest
Sourcepub fn validate(&self) -> Result<VerifyingKey, EnrollError>
pub fn validate(&self) -> Result<VerifyingKey, EnrollError>
Checks the request as both sides see it, and returns the key it names.
Trait Implementations§
Source§impl Clone for EnrollRequest
impl Clone for EnrollRequest
Source§impl Debug for EnrollRequest
impl Debug for EnrollRequest
Source§impl Default for EnrollRequest
impl Default for EnrollRequest
Source§impl<'de> Deserialize<'de> for EnrollRequest
impl<'de> Deserialize<'de> for EnrollRequest
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
Source§impl PartialEq for EnrollRequest
impl PartialEq for EnrollRequest
Source§impl Serialize for EnrollRequest
impl Serialize for EnrollRequest
impl StructuralPartialEq for EnrollRequest
Auto Trait Implementations§
impl Freeze for EnrollRequest
impl RefUnwindSafe for EnrollRequest
impl Send for EnrollRequest
impl Sync for EnrollRequest
impl Unpin for EnrollRequest
impl UnsafeUnpin for EnrollRequest
impl UnwindSafe for EnrollRequest
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