From 4ebafb93c329ada8417f8d9f061e1500eef1cbd9 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Tue, 30 Jul 2019 10:05:57 +0100 Subject: [PATCH] Rename isAccessToken to identityAccessToken --- src/AddThreepid.js | 4 ++-- src/IdentityAuthClient.js | 6 +++--- src/components/views/dialogs/AddressPickerDialog.js | 4 ++-- src/components/views/rooms/RoomPreviewBar.js | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/AddThreepid.js b/src/AddThreepid.js index a523e43643..8bd3099002 100644 --- a/src/AddThreepid.js +++ b/src/AddThreepid.js @@ -111,12 +111,12 @@ export default class AddThreepid { */ async haveMsisdnToken(msisdnToken) { const authClient = new IdentityAuthClient(); - const isAccessToken = await authClient.getAccessToken(); + const identityAccessToken = await authClient.getAccessToken(); const result = await MatrixClientPeg.get().submitMsisdnToken( this.sessionId, this.clientSecret, msisdnToken, - isAccessToken, + identityAccessToken, ); if (result.errcode) { throw result; diff --git a/src/IdentityAuthClient.js b/src/IdentityAuthClient.js index f3ec400148..dcc61c277b 100644 --- a/src/IdentityAuthClient.js +++ b/src/IdentityAuthClient.js @@ -63,10 +63,10 @@ export default class IdentityAuthClient { async registerForToken() { try { const hsOpenIdToken = await MatrixClientPeg.get().getOpenIdToken(); - const { access_token: isAccessToken } = + const { access_token: identityAccessToken } = await MatrixClientPeg.get().registerWithIdentityServer(hsOpenIdToken); - await this._checkToken(isAccessToken); - return isAccessToken; + await this._checkToken(identityAccessToken); + return identityAccessToken; } catch (err) { if (err.cors === "rejected" || err.httpStatus === 404) { // Assume IS only supports deprecated v1 API for now diff --git a/src/components/views/dialogs/AddressPickerDialog.js b/src/components/views/dialogs/AddressPickerDialog.js index 7ff9e8f233..6d1d8c0b4e 100644 --- a/src/components/views/dialogs/AddressPickerDialog.js +++ b/src/components/views/dialogs/AddressPickerDialog.js @@ -517,14 +517,14 @@ module.exports = React.createClass({ try { const authClient = new IdentityAuthClient(); - const isAccessToken = await authClient.getAccessToken(); + const identityAccessToken = await authClient.getAccessToken(); if (cancelled) return null; const lookup = await MatrixClientPeg.get().lookupThreePid( medium, address, undefined /* callback */, - isAccessToken, + identityAccessToken, ); if (cancelled || lookup === null || !lookup.mxid) return null; diff --git a/src/components/views/rooms/RoomPreviewBar.js b/src/components/views/rooms/RoomPreviewBar.js index 0fb8146943..7715bd9339 100644 --- a/src/components/views/rooms/RoomPreviewBar.js +++ b/src/components/views/rooms/RoomPreviewBar.js @@ -113,12 +113,12 @@ module.exports = React.createClass({ this.setState({busy: true}); try { const authClient = new IdentityAuthClient(); - const isAccessToken = await authClient.getAccessToken(); + const identityAccessToken = await authClient.getAccessToken(); const result = await MatrixClientPeg.get().lookupThreePid( 'email', this.props.invitedEmail, undefined /* callback */, - isAccessToken, + identityAccessToken, ); this.setState({invitedEmailMxid: result.mxid}); } catch (err) {