TwilioAccessManager Class Reference

Inherits from NSObject
Declared in TwilioAccessManager.h

Overview

Shared Access Manager for Twilio clients. Manages sharing an access token as well as notifications upon token expiry.

  delegate

Delegate for token expiry and error notifications.

@property (nonatomic, weak) id<TwilioAccessManagerDelegate> delegate

Discussion

Delegate for token expiry and error notifications.

Declared In

TwilioAccessManager.h

+ accessManagerWithToken:delegate:

Creates a new Access Manager instance initialized with the specified token.

+ (instancetype)accessManagerWithToken:(NSString *)token delegate:(id<TwilioAccessManagerDelegate>)delegate

Parameters

token

The client token.

delegate

Delegate for token expiry and error notifications.

Discussion

Creates a new Access Manager instance initialized with the specified token.

Declared In

TwilioAccessManager.h

– updateToken:

Updates the client token for consumers of this Access Manager instance.

- (void)updateToken:(NSString *)token

Parameters

token

The updated client token.

Discussion

Updates the client token for consumers of this Access Manager instance.

Declared In

TwilioAccessManager.h

– token

Returns the current client token being used by this Access Manager instance.

- (NSString *)token

Return Value

The current client token.

Discussion

Returns the current client token being used by this Access Manager instance.

Declared In

TwilioAccessManager.h

– identity

Returns the identity associated with the current client token.

- (NSString *)identity

Return Value

The current client token’s identity.

Discussion

Returns the identity associated with the current client token.

Declared In

TwilioAccessManager.h

– isExpired

Determines whether the current client token is past its expiration time.

- (BOOL)isExpired

Return Value

BOOL indicting whether the current client token is expired.

Discussion

Determines whether the current client token is past its expiration time.

Declared In

TwilioAccessManager.h

– expirationDate

Obtains the expiration date for the current client token.

- (NSDate *)expirationDate

Return Value

Expiration date for the current client token.

Discussion

Obtains the expiration date for the current client token.

Declared In

TwilioAccessManager.h