SKTAuthenticationDelegate Protocol Reference

Conforms to NSObject
Declared in SKTAuthenticationDelegate.h

Overview

Delegate protocol for events related to authentication.

Creating a delegate is optional, and may be used to receive callbacks for important authentication events.

– onInvalidToken:handler:

Notifies the delegate that the current jwt used to authenticate requests is invalid.

- (void)onInvalidToken:(NSError *)error handler:(SKTAuthenticationCompletionBlock)completionHandler

Parameters

error

Error object for the request

completionHandler

Block to call with the updated jwt

Discussion

Called when a request fails due to an invalid jwt. Use completionHandler to update the token and automatically retry the failed request. If the updated jwt is also invalid, this method is called again, with a maximum of 5 retry attempts per request.

Declared In

SKTAuthenticationDelegate.h