ZitiEnroller
@objc
public class ZitiEnroller : NSObject, ZitiUnretained
Class that enroll an identity with Ziti controller using a one-time JWT file
-
Class representing response to successful enrollment attempt
See moreDeclaration
Swift
@objc public class EnrollmentResponse : NSObject, Codable
-
Name of file containing one-time JWT
Declaration
Swift
@objc public var jwtFile: String
-
Initiaizel with a JWT file
Declaration
Swift
@objc public init(_ jwtFile: String)
Parameters
jwtFile
file containing one-time JWT
-
Type used for escaping callback closure called following an enrollment attempt
Declaration
Swift
public typealias EnrollmentCallback = (_ resp: EnrollmentResponse?, _ subj: String?, _ error: ZitiError?) -> Void
Parameters
resp
EnrollmentResponse returned on successful enrollment.
nil
on failed attemptsubj
sub
field indicated in JWT, representing unique id for this Ziti identity.nil
on failed attempterror
ZitiError
containing error information on failed enrollment attempt -
Enroll a Ziti identity using a JWT file
Declaration
Swift
@objc public func enroll(privatePem: String, cb: @escaping EnrollmentCallback)
Parameters
privatePem
private key in PEM format
cb
callback called indicating status of enrollment attempt
-
Extract the sub (id) field from HWT file
Declaration
Swift
@objc public func getSubj() -> String?
-
Retreive the claims in the JWT file
Declaration
Swift
public func getClaims() -> ZitiClaims?
Return Value
The claims in the file or nil if enable to decode