Enumerations

Summary

The iOS library provides 5 core enumerations to standardize the code.


AccountStatus

public enum AccountStatus

Describes the state of a Privakey Account.

StatusValueDescription
ACTIVE0The account is active and ready to be used.
ADMIN_SUSPENDED1The account has been suspended and an administrator is required to resume the account.
TOKEN_SUSPENDED2The account has been suspended until it is re-authenticated to the SSO server.
REVOKED3The account is revoked and disabled.

This enum also has the following methods:

Public Methods
public func getStatusId() -> Int
Gets the integer value of the status.
public static func valueOf(accountStatusId: Int) -> AccountStatus
The AccountStatus associated with the int ID.

DeviceStatus

public enum DeviceStatus

Describes the state of a Privakey Device.

StatusValueDescription
ACTIVE0The device is active and able to authenticate requests.
REVOKED2The device is revoked and disabled.
UNKNOWN-1The status is not known at this time.

This enum also has the following methods:

Public Methods
public func getStatusId() -> Int
Gets the integer value of the status.
public static func valueOf(deviceStatusId: Int) -> DeviceStatus
The DeviceStatus associated with the int ID.

NotificationType

public enum NotificationType : String

Describes the type of Privakey notification.

TypeDescription
AuthenticationSent when a request is created for a user account.
RequestCanceledSent when a pending request is canceled.
RequestTimedOutSent when a pending request expires.
RequestCompletedSent when a pending request is completed.
UpdateAccountSent when account information was updated.
TokenSuspendSent when an account’s bearer token expires or is revoked by it’s identity provider.
AdminSuspendSent when an Admin suspends a user’s account.
DeviceRevokeSent when a device is revoked and disabled.
RevokeAllCredentialsSent when an entire device is revoked and disabled. Used primarily internally.
AccountRevokeSent when an account is revoked and disabled.
ResumeSent when an account is re-activated from suspension.

RequestStatus

public enum RequestStatus : String, Codable

Describes the status of a Privakey Request.

StatusValueDescription
CANCELED1The request has been canceled.
COMPLETED2The request has been completed.
PENDING3The request is pending completion.
TIMEDOUT5The request is expired.
UNKNOWN-1The request status is unknown.