AccessTokenProvider
public protocol AccessTokenProvider
Protocol for objects that provide an access token and offer a way to refresh (short-lived) token.
-
Returns an access token for making user auth API calls.
Declaration
Swift
var accessToken: String { get }
-
This refreshes the access token if it’s expired or about to expire. The refresh result will be passed back via the completion block.
Declaration
Swift
func refreshAccessTokenIfNecessary(completion: @escaping DropboxOAuthCompletion)