Skip to content

Sharing credentials

Paal Kvamme requested to merge kvamme62/shared-cred into master

Cherry-picked from PR 376896 in our internal repository.

Add a few functions to facilitate sharing credentials between open files.

Some implementation of credentials may have a refresh token that can only be used once. Each refresh will then provide a new single-use refresh token. For this to work, one instance of an open file or a utility class must be designated as the owner of the credentials. Only the owner is allowed to refresh. Callbacks need to be hooked up so that other code can gets tokens from the owner.

The application will need to hook up the new callbacks depending on how the owner is chosen. Applications that don't deal with this kind of credentials do not need to change.

Merge request reports