pub struct EnrollmentV1 {
pub schema: String,
pub instance_id: String,
pub org: OrgRefV1,
pub lease: CloudLeaseEnvelopeV1,
pub keys: EnrollmentKeySet,
pub org_salt_id: String,
pub web_url: Option<String>,
pub instance_label: Option<String>,
}Expand description
Successful POST /v1/device/token.
Fields§
§schema: String§instance_id: String§org: OrgRefV1§lease: CloudLeaseEnvelopeV1§keys: EnrollmentKeySetSigned by the Cloud root key; verified before the lease. v1 for an engine below Cloud-Protocol 2.1, v3 from 2.1.
org_salt_id: StringId of the org salt the engine fetches with GET /v1/org/salt.
web_url: Option<String>1.3: origin of the LeanCTX Cloud web app (its “Open” link); may equal the API origin.
instance_label: Option<String>The name the person gave this computer on the approval page, as the
Cloud stored it (rc4-1). Additive: an older Cloud omits it and the
engine keeps the label it sent in DeviceTokenRequestV1. Display
only; a value that fails EnrollmentV1::chosen_label is ignored,
never a reason to refuse the enrollment. null reads as absent. The
rule is the Cloud’s (keyset.schema.json enrollment_for_2x
pattern, vectors/instance_label.vectors.json): no whitespace at the
start or end (a space, a no-break space or any other Unicode
whitespace), 1–64 characters, no control or super::invisible
character.
Implementations§
Source§impl EnrollmentV1
impl EnrollmentV1
Sourcepub fn chosen_label(&self) -> Option<&str>
pub fn chosen_label(&self) -> Option<&str>
The name chosen on the approval page when it is 1–64 characters of
printable text without whitespace at either end; None when absent
or unusable, so the engine keeps the name it sent.
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Structural checks; signature checks are the engine’s
(keys against the root key, then lease against keys).