Under Review
Last Updated: 18 Jul 2025 07:12 by ADMIN
Dominik
Created on: 11 Jul 2025 10:01
Type: Feature Request
0
Passing time limited AccessTokens to the ReportViewer

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:

  1. Implement a function with signature "string GetAccessToken()"
  2. Set that function to the property AccessTokenProvider of the designer/viewer
  3. Designer/Viewer wants to make a request and fetches and caches the access token
  4. Designer/Viewer uses that access token until it hits a 401 upon which
    1. The Cached access token is cleared
    2. A new Access token is fetched from AccessTokenProvider and then cached
    3. Retry the request with the new access token
    4. Should the retry also fail return the failure

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.


0 comments