PCSDKModule Documentation

Structure PCUser

public struct PCUser: Decodable  

The struct that holds information about a user

PCUser PCUser Decodable Decodable PCUser->Decodable Equatable Equatable PCUser->Equatable

Conforms To

Decodable
Equatable

Initializers

init(from:​)

public init(from decoder: Decoder) throws  

:nodoc:

Properties

user​ID

public let userID: String

User's identifier generated by the PControl System

expiration​Date

public var expirationDate: Date  

User's expiration date

system​ID

public let systemID: String

The system's identifier

options

public let options: PCUserOptions

User's options

interaction​URL

public let interactionURL: URL

URL of the external server

name

public var name: String? 

User's name to store in the device storage

registered​Device​Token

public var registeredDeviceToken: String? 

Registered device token for this user

suggested​User​Name

public var suggestedUserName: String? 

The name for the user suggested by the server

public​Key

public var publicKey: String? 

Registered public key for this user

api​Version

public internal(set) var apiVersion: Int? 

API's version of the system

system​Name

public internal(set) var systemName: String? 

Name of the system

ext​Auth​Methods

public internal(set) var extAuthMethods: Set<PCExtendedAuthType>

User's list of extended authentication methods

is​Activated

public var isActivated: Bool  

Returns true if the user is activated

is​Ready​ToSign

public var isReadyToSign: Bool  

Checks if password has been submitted for this user and the user is still being unlocked

has​Key​Pair

public var hasKeyPair: Bool  

Checks if user has registered public key

is​Expired

public var isExpired: Bool  

Returns true if the user is expired

confirmation​Code​TSI

public var confirmationCodeTSI: TimeInterval

Expiration interval of generated signatures and codes. By default - 180 seconds

authorization​Code​TSI

public var authorizationCodeTSI: TimeInterval

Expiration interval of authorization codes. By default - 180 seconds

unique​ID

public var uniqueID: String  

Unique identifier of this user.

is​Registered​ToAutosign

public var isRegisteredToAutosign: Bool  

Returns true if user has been registered to use autosign

key​Index

public var keyIndex: Int? 

Returns the sequence number of the key

Methods

reset()

public func reset()  

Removes all handles by this user

Operators

==

public static func == (lhs: PCUser, rhs: PCUser) -> Bool