"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "extensions/microsoft-authentication/src/AADHelper.ts" between
vscode-1.48.2.tar.gz and vscode-1.49.0.tar.gz

About: Visual Studio Code is a source code editor (available for Windows, macOS and Linux). It comes with built-in support for JavaScript, TypeScript and Node.js and has extensions for other languages (such as C++, C#, Java, Python, PHP, Go). Source code.

AADHelper.ts  (vscode-1.48.2):AADHelper.ts  (vscode-1.49.0)
/*------------------------------------------------------------------------------ --------------- /*------------------------------------------------------------------------------ ---------------
* Copyright (c) Microsoft Corporation. All rights reserved. * Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for lice nse information. * Licensed under the MIT License. See License.txt in the project root for lice nse information.
*------------------------------------------------------------------------------ --------------*/ *------------------------------------------------------------------------------ --------------*/
import * as randomBytes from 'randombytes'; import * as randomBytes from 'randombytes';
import * as querystring from 'querystring'; import * as querystring from 'querystring';
import { Buffer } from 'buffer';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import { createServer, startServer } from './authServer'; import { createServer, startServer } from './authServer';
import { v4 as uuid } from 'uuid'; import { v4 as uuid } from 'uuid';
import { keychain } from './keychain'; import { keychain } from './keychain';
import Logger from './logger'; import Logger from './logger';
import { toBase64UrlEncoding } from './utils'; import { toBase64UrlEncoding } from './utils';
import fetch from 'node-fetch'; import fetch from 'node-fetch';
import { sha256 } from './env/node/sha256'; import { sha256 } from './env/node/sha256';
skipping to change at line 531 skipping to change at line 532
const token = this.getTokenFromResponse(json, sco pe, sessionId); const token = this.getTokenFromResponse(json, sco pe, sessionId);
this.setToken(token, scope); this.setToken(token, scope);
Logger.info('Token refresh success'); Logger.info('Token refresh success');
return token; return token;
} else { } else {
Logger.error('Refreshing token failed'); Logger.error('Refreshing token failed');
throw new Error('Refreshing token failed.'); throw new Error('Refreshing token failed.');
} }
} catch (e) { } catch (e) {
Logger.error('Refreshing token failed'); Logger.error('Refreshing token failed');
throw e; throw new Error(REFRESH_NETWORK_FAILURE);
} }
} }
private clearSessionTimeout(sessionId: string): void { private clearSessionTimeout(sessionId: string): void {
const timeout = this._refreshTimeouts.get(sessionId); const timeout = this._refreshTimeouts.get(sessionId);
if (timeout) { if (timeout) {
clearTimeout(timeout); clearTimeout(timeout);
this._refreshTimeouts.delete(sessionId); this._refreshTimeouts.delete(sessionId);
} }
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)