DeviceBindingError
enum DeviceBindingError
Errors surfaced by the device-binding facade.
The client-only cases (.invalidQrPayload, .keyUnavailable, .signingFailed,
.bridgeUnavailable) never originate from the server. The remaining cases mirror
server’s error reasons one-to-one, so host apps can switch on a
specific reason (e.g. show “your device was revoked, please re-enroll” for
.bindingRevoked vs “token expired, scan a new QR” for .tokenExpired). Anything we
can’t classify is reported as .unknown(reason:message:) carrying the raw strings.
-
The QR payload could not be parsed (missing/invalid
tokenquery parameter).Declaration
Swift
case invalidQrPayload -
We could not generate or read the device key pair (Keychain failure).
Declaration
Swift
case keyUnavailable -
Signing the challenge with the device’s private key failed.
Declaration
Swift
case signingFailed -
The device-binding REST call could not be made or completed — e.g. the configured server URL/entry path is invalid, the request/response could not be encoded/decoded, or the transport (including login) failed.
Declaration
Swift
case bridgeUnavailable(String) -
The login preceding the binding calls was rejected by the server.
Declaration
Swift
case invalidCredentials -
Registration token from the QR is invalid / not recognized by the server.
Declaration
Swift
case invalidToken -
Registration token expired before the device completed enrollment.
Declaration
Swift
case tokenExpired -
registerWithQrPayload(...)/registerWithToken(...)was called without first callingissueEnrollmentChallenge.Declaration
Swift
case enrollmentChallengeNotIssued -
The enrollment challenge expired before the device returned the signature.
Declaration
Swift
case enrollmentChallengeExpired -
The device’s public key could not be parsed by the server.
Declaration
Swift
case invalidPublicKey -
The current user has reached the maximum number of active bindings.
Declaration
Swift
case bindingLimitReached -
The requested binding does not exist on the server.
Declaration
Swift
case bindingNotFound -
The binding was previously revoked server-side. Host app should re-enroll.
Declaration
Swift
case bindingRevoked -
The binding belongs to a different user than the one in the current session.
Declaration
Swift
case bindingOwnershipMismatch -
The server rejected the signature for the challenge.
Declaration
Swift
case signatureRejected -
The verify challenge expired before the device returned the signature.
Declaration
Swift
case challengeExpired -
The signed challenge did not match the server-stored challenge.
Declaration
Swift
case challengeMismatch -
The current request has no resolvable
DeviceInfo(no device identifier).Declaration
Swift
case deviceInfoNotFound -
A server reason we couldn’t map to a typed case, carrying the raw reason and message strings.
Declaration
Swift
case unknown(reason: String, message: String)