1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Change to provider object

This commit is contained in:
J. Ryan Stinnett
2019-08-23 11:17:39 +01:00
parent 31e72efc91
commit 3d274815d9
2 changed files with 17 additions and 13 deletions

View File

@@ -63,10 +63,11 @@ function termsUrlForService(serviceType, baseUrl) {
*
* @param {string} opts.accessToken The access_token for this user.
*
* @param {Function} [opts.getIdentityAccessToken]
* Optional. A callback that returns a Promise<String> of an identity access
* token to supply with identity requests. If the callback is unset, no access
* token will be supplied.
* @param {IdentityServerProvider} [opts.identityServer]
* Optional. A provider object with one function `getAccessToken`, which is a
* callback that returns a Promise<String> of an identity access token to supply
* with identity requests. If the object is unset, no access token will be
* supplied.
* See also https://github.com/vector-im/riot-web/issues/10615 which seeks to
* replace the previous approach of manual access tokens params with this
* callback throughout the SDK.
@@ -87,7 +88,7 @@ function MatrixBaseApis(opts) {
this.baseUrl = opts.baseUrl;
this.idBaseUrl = opts.idBaseUrl;
this.getIdentityAccessToken = opts.getIdentityAccessToken;
this.identityServer = opts.identityServer;
const httpOpts = {
baseUrl: opts.baseUrl,