ZitiIdentity
@objc
open class ZitiIdentity : NSObject, Codable
Identity information for interacting with Ziti
Objects of these types are Codable
so can easiliy be converted to/from JSON and stored on disk. A ZitiIdentity
is created as part of Ziti.enroll(_:_:)
, and can be used to initialiaze on instance of Ziti
.
See
See Also:-
Identity string
Initially the
sub
field from the one-time enrollment JWT. Used byZiti
to store and retrieve identity-related items in the KeychainDeclaration
Swift
@objc public let id: String
-
scheme, host, and port used to communicate with Ziti controller
Declaration
Swift
@objc public var ztAPI: String
-
name assocaited with this identity in Ziti.
Note that this name is unknown until a session with Ziti is active
Declaration
Swift
@objc public var name: String?
-
CA pool verified as part of enrollment that can be used to establish trust with of the Ziti controller
Declaration
Swift
@objc public var ca: String?
-
Request
Ziti
to start this identity in disabled stateDeclaration
Swift
public var startDisabled: Bool?
-
Initialize a
ZitiIdentity
given the provided identity infomationDeclaration
Swift
@objc public init(id: String, ztAPI: String, name: String? = nil, ca: String? = nil)
Parameters
id
unique identifier of this identity
ztAPI
URL for accessing Ziti controller API
name
name currently configured for this identity
ca
CA pool that can be used to verify trust of the Ziti controller
-
Save this object to a JSON file
This file can be used to initialize a
Ziti
object.Declaration
Swift
@objc public func save(_ initFile: String) -> Bool
Parameters
initFile
file containing JSON-encoded data representing this object