Skip to main content

Module enroll

Module enroll 

Source
Expand description

Device-flow enrollment and instance access tokens.

There is no refresh token: the instance’s Ed25519 key is its only long-lived secret and mints short access tokens through a signed assertion.

Re-exports§

pub use super::app_keys::AppKeyAnnouncementV1;
pub use super::app_keys::AppKeyKind;
pub use super::app_keys::AppKeyOfferV1;
pub use super::app_keys::FEATURE_DEVICE_APP_KEYS;
pub use super::app_keys::app_key_bind_signing_input;

Structs§

AccessTokenV1
Response of POST /v1/instances/{instance_id}/token.
CompanyRefV1
The company of a team: the business that holds its Enterprise plan.
DeviceCodeRequestV1
POST /v1/device/code.
DeviceCodeV1
Response of POST /v1/device/code.
DeviceSetupProjectV1
DeviceSetupRequestV1
C0 2.1 POST /v1/device/setup (no token; the pending device_code): the project this engine runs in and what it shares, shown on the approval page (routes/device_setup.request.json). Requester’s claims.
DeviceSetupResultV1
C0 2.1 POST /v1/device/setup/result (instance token): routes/device_setup_result.request.json.
DeviceTokenRequestV1
POST /v1/device/token: poll until the user approved, then enroll the instance with its public keys.
EnrollmentV1
Successful POST /v1/device/token.
InstanceTokenRequestV1
POST /v1/instances/{instance_id}/token.
OrgRefV1
Organization reference: the workspace the instance enrolls in.

Enums§

DeviceIntent
DeviceCodeRequestV1.intent.
EngineOs
Operating-system family of the engine.
TrialPlan
DeviceCodeRequestV1.plan: the plan a one-step trial starts.

Constants§

ACCESS_TOKEN_SCHEMA
DEVICE_CODE_REQUEST_SCHEMA
DEVICE_CODE_SCHEMA
DEVICE_SETUP_REQUEST_SCHEMA
DEVICE_SETUP_RESULT_SCHEMA
DEVICE_TOKEN_REQUEST_SCHEMA
ENROLLMENT_SCHEMA
FEATURE_DEVICE_SETUP
C0 2.1 features entry: the approval page shares the project too.
MAX_ACCESS_TOKEN_SECONDS
Longest access-token lifetime the service issues.
MAX_ASSERTION_SKEW_SECONDS
Accepted distance between iat and service time.
MAX_INSTANCE_LABEL_CHARS
Longest instance label, in characters.
TOKEN_REQUEST_SCHEMA

Functions§

token_assertion_input
Bytes the instance key signs: "leanctx.cloud.token.v1\n" + instance_id + "\n" + iat + "\n" + nonce (iat in decimal unix seconds).