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.

  • id

    Identity string

    Initially the sub field from the one-time enrollment JWT. Used by Ziti to store and retrieve identity-related items in the Keychain

    Declaration

    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

    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 state

    Declaration

    Swift

    public var startDisabled: Bool?
  • Initialize a ZitiIdentity given the provided identity infomation

    Declaration

    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.

    See

    See also:

    Declaration

    Swift

    @objc
    public func save(_ initFile: String) -> Bool

    Parameters

    initFile

    file containing JSON-encoded data representing this object