pub struct DeviceTokenRequestV1 {
pub schema: String,
pub device_code: String,
pub instance_public_key: String,
pub instance_kx_public_key: String,
pub instance_label: String,
pub instance_version: String,
pub os: EngineOs,
pub chat_key: Option<AppKeyOfferV1>,
pub optin_key: Option<AppKeyOfferV1>,
pub task_propose_key: Option<AppKeyOfferV1>,
pub app_keys_bind_signature: Option<String>,
}Expand description
POST /v1/device/token: poll until the user approved, then enroll the
instance with its public keys.
Fields§
§schema: String§device_code: String§instance_public_key: StringEd25519 public key (32 bytes, base64) the instance signs assertions with.
instance_kx_public_key: StringX25519 public key (32 bytes, base64); enrollment carries it.
instance_label: StringUser-visible name, e.g. the host name when labels are on.
instance_version: String§os: EngineOs§chat_key: Option<AppKeyOfferV1>f3129 offers of the announced app keys, each with its own
bind_signature. Together they must equal app_keys of the code
request; absent when none was announced.
optin_key: Option<AppKeyOfferV1>§task_propose_key: Option<AppKeyOfferV1>§app_keys_bind_signature: Option<String>f3129 S3: base64url (no padding) Ed25519 signature of
instance_public_key over app_key_bind_signing_input. Required
whenever app keys were announced; absent otherwise.
Implementations§
Source§impl DeviceTokenRequestV1
impl DeviceTokenRequestV1
pub fn validate(&self) -> Result<(), ValidationError>
Sourcepub fn app_key_offers(&self) -> Vec<(AppKeyKind, &AppKeyOfferV1)>
pub fn app_key_offers(&self) -> Vec<(AppKeyKind, &AppKeyOfferV1)>
The offered app keys, sorted by kind.
Sourcepub fn app_key_offer_mut(
&mut self,
kind: AppKeyKind,
) -> &mut Option<AppKeyOfferV1>
pub fn app_key_offer_mut( &mut self, kind: AppKeyKind, ) -> &mut Option<AppKeyOfferV1>
The offer member of kind.
Trait Implementations§
Source§impl Clone for DeviceTokenRequestV1
impl Clone for DeviceTokenRequestV1
Source§impl Debug for DeviceTokenRequestV1
impl Debug for DeviceTokenRequestV1
Source§impl<'de> Deserialize<'de> for DeviceTokenRequestV1
impl<'de> Deserialize<'de> for DeviceTokenRequestV1
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
impl Eq for DeviceTokenRequestV1
Source§impl PartialEq for DeviceTokenRequestV1
impl PartialEq for DeviceTokenRequestV1
Source§impl Serialize for DeviceTokenRequestV1
impl Serialize for DeviceTokenRequestV1
impl StructuralPartialEq for DeviceTokenRequestV1
Auto Trait Implementations§
impl Forget for DeviceTokenRequestV1
impl Freeze for DeviceTokenRequestV1
impl Move for DeviceTokenRequestV1
impl RefUnwindSafe for DeviceTokenRequestV1
impl Send for DeviceTokenRequestV1where
RawVecInner: Send,
impl Sync for DeviceTokenRequestV1where
RawVecInner: Sync,
impl Unpin for DeviceTokenRequestV1
impl UnsafeUnpin for DeviceTokenRequestV1
impl UnwindSafe for DeviceTokenRequestV1where
RawVecInner: UnwindSafe,
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