TokenProvider

public protocol TokenProvider

Provider for a content access token.

  • Property for checking whether the provider has a token to provide at all.

    Declaration

    Swift

    var hasToken: Bool { get }
  • Called when the SDK needs a token for a reason described by [reason].

    Call [completion] when a token is available. It can be called either immediately and synchronously, or at a later point. If this is callback is never called, the SDK will be in an undefined state.

    Declaration

    Swift

    func token(reason: TokenRequestReason, trigger: TokenRequestTrigger, completion: @escaping TokenCompletion)