mirror of https://github.com/vector-im/riot-web
Rename isAccessToken to identityAccessToken
parent
654a8c2cb8
commit
4ebafb93c3
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue