We'd like to have a settable property on the web designer and report viewer which takes a function which returns an access token.
This way a new access token can be requested by the designer/viewer when the current one expires.
This is usually used in the following way:
Should the above be to specific/inflexible:
Instead of caching the access token, call AccessTokenProvider for every fetch but also provide an additional parameter with the "reason" for the call, so the implementer of AccessTokenProvider can decide themselves when to return a cached AccessToken or generate a new one.