HAResponseCurrentUser
public struct HAResponseCurrentUser : HADataDecodable
The current user
-
The ID of the user; this is a long hex string
Declaration
Swift
public var id: String -
The name of the user, if one is set
Declaration
Swift
public var name: String? -
Whether the user is an owner
Declaration
Swift
public var isOwner: Bool -
Whether the user is an admin
Admins have access to a different set of commands; you may need to handle failures for commands which are not allowed to be executed by non-admins.
Declaration
Swift
public var isAdmin: Bool -
Which credentials apply to this user
Declaration
Swift
public var credentials: [Credential] -
Which MFA modules are available, which may include those not enabled
Declaration
Swift
public var mfaModules: [MFAModule] -
A credential authentication provider
See moreDeclaration
Swift
public struct Credential : HADataDecodable -
An MFA module
See moreDeclaration
Swift
public struct MFAModule : HADataDecodable -
Create with data
Throws
If any required keys are missingDeclaration
Swift
public init(data: HAData) throwsParameters
dataThe data from the server
-
Create with information
Declaration
Swift
public init( id: String, name: String?, isOwner: Bool, isAdmin: Bool, credentials: [Credential], mfaModules: [MFAModule] )Parameters
idThe id of the user
nameThe name of the user
isOwnerWhether the user is an owner
isAdminWhether the user is an admin
credentialsCredentials for the user
mfaModulesMFA Modules for the user
View on GitHub