Enumerations
Summary
The iOS library provides 5 core enumerations to standardize the code.
AccountStatus
public enum AccountStatus
Describes the state of a Privakey Account.
Status | Value | Description |
---|---|---|
ACTIVE | 0 | The account is active and ready to be used. |
ADMIN_SUSPENDED | 1 | The account has been suspended and an administrator is required to resume the account. |
TOKEN_SUSPENDED | 2 | The account has been suspended until it is re-authenticated to the SSO server. |
REVOKED | 3 | The 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.
Status | Value | Description |
---|---|---|
ACTIVE | 0 | The device is active and able to authenticate requests. |
REVOKED | 2 | The device is revoked and disabled. |
UNKNOWN | -1 | The 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.
Type | Description |
---|---|
Authentication | Sent when a request is created for a user account. |
RequestCanceled | Sent when a pending request is canceled. |
RequestTimedOut | Sent when a pending request expires. |
RequestCompleted | Sent when a pending request is completed. |
UpdateAccount | Sent when account information was updated. |
TokenSuspend | Sent when an account’s bearer token expires or is revoked by it’s identity provider. |
AdminSuspend | Sent when an Admin suspends a user’s account. |
DeviceRevoke | Sent when a device is revoked and disabled. |
RevokeAllCredentials | Sent when an entire device is revoked and disabled. Used primarily internally. |
AccountRevoke | Sent when an account is revoked and disabled. |
Resume | Sent when an account is re-activated from suspension. |
RequestStatus
public enum RequestStatus : String, Codable
Describes the status of a Privakey Request.
Status | Value | Description |
---|---|---|
CANCELED | 1 | The request has been canceled. |
COMPLETED | 2 | The request has been completed. |
PENDING | 3 | The request is pending completion. |
TIMEDOUT | 5 | The request is expired. |
UNKNOWN | -1 | The request status is unknown. |
Updated over 3 years ago