AccessTokenProviderObjc
@available(iOS 12.0, *)
@objc(BDKAccessTokenProvider)
public protocol AccessTokenProviderObjc : NSObjectProtocol
A component providing “access tokens” for a user. This protocol is meant to be used in objective-c.
This protocol is the objective-c version of the AccessTokenProvider
protocol.
See also
AccessTokenProvider
-
The Kaleyra Video will call this method whenever an access token for the user identified by the
userId
parameter is required Once an access token is retrieved you should call thecompletion
closure provided as second parameter reporting a result for the operation. This method may be invoked several times during the lifecycle of your app.Remark
This method may be invoked from a background private queue, do not expect this method to be invoked from the main queueDeclaration
Swift
func provideAccessToken(userId: String, success: @escaping (String) -> Void, error: @escaping (Error) -> Void)
Parameters
userId
A value identifying the user in the Kaleyra Video platform
success
The completion closure you must invoke when your component has retrieved an access token successfully
error
The completion closure you must invoke when your component could not retrieve the access token because of an error