Rename isAccessToken to identityAccessToken
This commit is contained in:
parent
654a8c2cb8
commit
4ebafb93c3
4 changed files with 9 additions and 9 deletions
|
@ -111,12 +111,12 @@ export default class AddThreepid {
|
||||||
*/
|
*/
|
||||||
async haveMsisdnToken(msisdnToken) {
|
async haveMsisdnToken(msisdnToken) {
|
||||||
const authClient = new IdentityAuthClient();
|
const authClient = new IdentityAuthClient();
|
||||||
const isAccessToken = await authClient.getAccessToken();
|
const identityAccessToken = await authClient.getAccessToken();
|
||||||
const result = await MatrixClientPeg.get().submitMsisdnToken(
|
const result = await MatrixClientPeg.get().submitMsisdnToken(
|
||||||
this.sessionId,
|
this.sessionId,
|
||||||
this.clientSecret,
|
this.clientSecret,
|
||||||
msisdnToken,
|
msisdnToken,
|
||||||
isAccessToken,
|
identityAccessToken,
|
||||||
);
|
);
|
||||||
if (result.errcode) {
|
if (result.errcode) {
|
||||||
throw result;
|
throw result;
|
||||||
|
|
|
@ -63,10 +63,10 @@ export default class IdentityAuthClient {
|
||||||
async registerForToken() {
|
async registerForToken() {
|
||||||
try {
|
try {
|
||||||
const hsOpenIdToken = await MatrixClientPeg.get().getOpenIdToken();
|
const hsOpenIdToken = await MatrixClientPeg.get().getOpenIdToken();
|
||||||
const { access_token: isAccessToken } =
|
const { access_token: identityAccessToken } =
|
||||||
await MatrixClientPeg.get().registerWithIdentityServer(hsOpenIdToken);
|
await MatrixClientPeg.get().registerWithIdentityServer(hsOpenIdToken);
|
||||||
await this._checkToken(isAccessToken);
|
await this._checkToken(identityAccessToken);
|
||||||
return isAccessToken;
|
return identityAccessToken;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err.cors === "rejected" || err.httpStatus === 404) {
|
if (err.cors === "rejected" || err.httpStatus === 404) {
|
||||||
// Assume IS only supports deprecated v1 API for now
|
// Assume IS only supports deprecated v1 API for now
|
||||||
|
|
|
@ -517,14 +517,14 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const authClient = new IdentityAuthClient();
|
const authClient = new IdentityAuthClient();
|
||||||
const isAccessToken = await authClient.getAccessToken();
|
const identityAccessToken = await authClient.getAccessToken();
|
||||||
if (cancelled) return null;
|
if (cancelled) return null;
|
||||||
|
|
||||||
const lookup = await MatrixClientPeg.get().lookupThreePid(
|
const lookup = await MatrixClientPeg.get().lookupThreePid(
|
||||||
medium,
|
medium,
|
||||||
address,
|
address,
|
||||||
undefined /* callback */,
|
undefined /* callback */,
|
||||||
isAccessToken,
|
identityAccessToken,
|
||||||
);
|
);
|
||||||
if (cancelled || lookup === null || !lookup.mxid) return null;
|
if (cancelled || lookup === null || !lookup.mxid) return null;
|
||||||
|
|
||||||
|
|
|
@ -113,12 +113,12 @@ module.exports = React.createClass({
|
||||||
this.setState({busy: true});
|
this.setState({busy: true});
|
||||||
try {
|
try {
|
||||||
const authClient = new IdentityAuthClient();
|
const authClient = new IdentityAuthClient();
|
||||||
const isAccessToken = await authClient.getAccessToken();
|
const identityAccessToken = await authClient.getAccessToken();
|
||||||
const result = await MatrixClientPeg.get().lookupThreePid(
|
const result = await MatrixClientPeg.get().lookupThreePid(
|
||||||
'email',
|
'email',
|
||||||
this.props.invitedEmail,
|
this.props.invitedEmail,
|
||||||
undefined /* callback */,
|
undefined /* callback */,
|
||||||
isAccessToken,
|
identityAccessToken,
|
||||||
);
|
);
|
||||||
this.setState({invitedEmailMxid: result.mxid});
|
this.setState({invitedEmailMxid: result.mxid});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue