JWTAuthenticator
@objc(ZDKJWTAuthenticator)
public protocol JWTAuthenticator : NSObjectProtocol
Protocol that an object that handles authentication should conform to. Called by the ChatSDK
everytime authentication is required.
-
This function is called on behalf of ChatSDK every-time a new
JWT
token is required to authenticate your user. Implement this function to generate theJWT
token that Zendesk Chat can understand. Callcompletion
with the successfulJWT
response or the error that might occur.Declaration
Swift
func getToken(_ completion: @escaping (String?, Error?) -> Void)
Parameters
completion
The completion is declared as follows: (
JWT Token
,Error
)