CommunicationTokenRefreshOptions
@objcMembers
public class CommunicationTokenRefreshOptions : NSObject
The Communication Token Refresh Options. Used to initialize a CommunicationTokenCredential
-
Initializes a new instance of
CommunicationTokenRefreshOptions
The cached token is updated iftoken(completionHandler: )
is called and if the difference between the current time and token expiry time is less than 120s. IfrefreshProactively
parameter istrue
:- The cached token will be updated in the background when the difference between the current time and token expiry time is less than 600s.
- The cached token will be updated immediately when the constructor is invoked and
initialToken
is expired - initialToken: The initial value of the token.
- refreshProactively: Whether the token should be proactively refreshed in the background.
- tokenRefresher: Closure to call when a new token value is needed.
Declaration
Swift
public init( initialToken: String? = nil, refreshProactively: Bool = false, tokenRefresher: @escaping TokenRefresher )