Interface AuthorizationProvider

Hierarchy

  • AuthorizationProvider

Methods

  • Returns an authorization that can be used together with the CFTools Data API. The token provided by this function is guaranteed to be valid for enough time to make at least one request.

    The implementation decides if and how an authorization is cached between two subsequent calls to this method. However, implementations should consider caching the authorization for as long as the authorization is valid (if this information is available by the provider where the authorization was gathered from).

    Parameters

    • client: HttpClient

    Returns Promise<Authorization>

  • A back-channel for users of the provided authorization from provide(). Should be used, when the authorization is, different than expected, reported to be expired from CFTools. This should only be used while a request was made in a reasonable amount of time after the authorization was gathered from the provider.

    It's up to the provider if this information is processed and used and how it is used. The provider might evict any potential cache that might be used or refresh the authorization pre-maturely. It may also just ignore this report as well.

    Implementations should respect this information from clients, as it gives reasonable doubt that the currently provided authorization is invalid or expired for some reason.

    Returns void

Generated using TypeDoc