spawnEnrollment

public abstract AsyncOperation<App2AppEnrollmentInfo> spawnEnrollment(String userId, Integer validDurationSeconds)

Protected operation to spawn a short-lived enrollment for an existing enrolled user. The returned App2AppEnrollmentInfo contains an activation code that can be converted into QR codes via getEnrollmentExchangeTokens for scanning by another device.

This is a protected operation — the SDK must be unlocked before calling this method.

Parameters

userId

the user id of the enrolled account for which the enrollment is created.

validDurationSeconds

the valid duration of the spawned enrollment. *

Minimum value allowed: 60 seconds. *

Maximum value allowed: 180 seconds. *

Default: 60 seconds.

Throws

if the SDK is locked.

if the SDK is currently blocked by any blocking operation.

if the validDurationSeconds set is not withing support range.

if there is no account enrolled for the provided user id.

if the SDK fails to sign the API request.

if the SDK cannot access the necessary cryptographic material for this operation.

if the Keystore fails to perform the necessary cryptographic operations.

if the API request fails. Refer to FTApiException subtypes for more specific errors.