Rename isAccessToken to identityAccessToken

This commit is contained in:
J. Ryan Stinnett 2019-07-30 10:05:57 +01:00
parent 654a8c2cb8
commit 4ebafb93c3
4 changed files with 9 additions and 9 deletions

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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) {