TwilioAccessManagerDelegate Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | TwilioAccessManager.h |
Overview
The TwilioAccessManagerDelegate will let your application know when tokens are either about to expire or have already expired.
The accessManagerTokenWillExpire: delegate method will be called 3 minutes prior to token expiry or immediately if the token is already expired.
The accessManagerTokenExpired: delegate method will be called upon token expiry or immediately if the token is already expired.
It is usually best to implement just one of these methods, with the accessManagerTokenWillExpire: method being the recommended as it allows your client SDK’s to update their access token before an interruption in communication with Twilio may occur.
– accessManagerTokenWillExpire:
Called when the access token is within 3 minutes of expiring.
- (void)accessManagerTokenWillExpire:(nonnull TwilioAccessManager *)accessManager
Parameters
accessManager |
The access manager instance that needs to be updated. |
---|
Discussion
Called when the access token is within 3 minutes of expiring.
Declared In
TwilioAccessManager.h
– accessManagerTokenExpired:
Called when the access token has expired. May be called after expiry if the application was in backgrounded at the time of expiration.
- (void)accessManagerTokenExpired:(nonnull TwilioAccessManager *)accessManager
Parameters
accessManager |
The access manager instance that needs to be updated. |
---|
Discussion
Called when the access token has expired. May be called after expiry if the application was in backgrounded at the time of expiration.
Declared In
TwilioAccessManager.h
– accessManagerTokenInvalid:
Called if an access token is provided that is in an invalid format.
- (void)accessManagerTokenInvalid:(nonnull TwilioAccessManager *)accessManager
Parameters
accessManager |
The access manager instance that experienced the error. |
---|
Discussion
Called if an access token is provided that is in an invalid format.
Declared In
TwilioAccessManager.h