Skip to content

Commit

Permalink
Upgraded Dependencies. Fixed several issues. (#979)
Browse files Browse the repository at this point in the history
  • Loading branch information
azaslonov authored Oct 20, 2020
1 parent 513af16 commit abd018b
Show file tree
Hide file tree
Showing 14 changed files with 3,189 additions and 1,873 deletions.
3,214 changes: 1,407 additions & 1,807 deletions package-lock.json

Large diffs are not rendered by default.

70 changes: 35 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,71 +23,71 @@
"postinstall": "npm rebuild node-sass"
},
"devDependencies": {
"@azure/storage-blob": "12.1.2",
"@types/chai": "^4.2.12",
"@azure/storage-blob": "12.2.1",
"@types/chai": "^4.2.14",
"@types/google-maps": "^3.2.2",
"@types/knockout": "^3.4.68",
"@types/knockout": "^3.4.69",
"@types/knockout.mapping": "^2.0.35",
"@types/knockout.validation": "0.0.37",
"@types/lodash": "^4.14.160",
"@types/lodash": "^4.14.162",
"@types/mime-types": "^2.1.0",
"@types/mocha": "8.0.3",
"@types/node": "^14.6.0",
"@types/node": "^14.11.10",
"@types/puppeteer": "^3.0.2",
"autoprefixer": "^9.8.6",
"autoprefixer": "^10.0.1",
"awesome-typescript-loader": "^5.2.1",
"azure-storage": "^2.10.3",
"chai": "^4.2.0",
"clean-webpack-plugin": "2.0.2",
"copy-webpack-plugin": "^6.0.3",
"css-loader": "^4.2.2",
"file-loader": "^6.0.0",
"html-loader": "^1.2.1",
"mini-css-extract-plugin": "^0.10.0",
"mocha": "^8.1.1",
"copy-webpack-plugin": "^6.2.1",
"css-loader": "^5.0.0",
"file-loader": "^6.1.1",
"html-loader": "^1.3.2",
"mini-css-extract-plugin": "^1.0.0",
"mocha": "^8.1.3",
"node-sass": "^4.14.1",
"path": "^0.12.7",
"postcss-loader": "^3.0.0",
"puppeteer": "^5.2.1",
"raw-loader": "^4.0.1",
"sass-loader": "^9.0.3",
"style-loader": "^1.2.1",
"terser-webpack-plugin": "^4.1.0",
"postcss-loader": "^4.0.4",
"puppeteer": "^5.3.1",
"raw-loader": "^4.0.2",
"sass-loader": "^10.0.3",
"style-loader": "^2.0.0",
"terser-webpack-plugin": "^5.0.0",
"ts-node": "9.0.0",
"tslint": "^6.1.3",
"typescript": "4.0.2",
"url-loader": "^4.1.0",
"typescript": "4.0.3",
"url-loader": "^4.1.1",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^5.1.2"
"webpack-merge": "^5.2.0"
},
"dependencies": {
"@paperbits/azure": "0.1.322",
"@paperbits/common": "0.1.322",
"@paperbits/core": "0.1.322",
"@paperbits/prosemirror": "0.1.322",
"@paperbits/styles": "0.1.322",
"@paperbits/azure": "0.1.336",
"@paperbits/common": "0.1.336",
"@paperbits/core": "0.1.336",
"@paperbits/prosemirror": "0.1.336",
"@paperbits/styles": "0.1.336",
"@webcomponents/custom-elements": "1.4.2",
"@webcomponents/shadydom": "^1.7.4",
"adal-vanilla": "^1.0.18",
"applicationinsights-js": "^1.0.21",
"client-oauth2": "4.2.5",
"client-oauth2": "4.3.3",
"core-js": "^3.6.5",
"d3": "^5.16.0",
"google-maps": "^4.3.2",
"d3": "^6.2.0",
"google-maps": "^4.3.3",
"js-beautify": "^1.13.0",
"knockout": "^3.5.1",
"knockout-mapping": "^2.6.0",
"knockout.validation": "^2.0.4",
"liquidjs": "^9.15.0",
"liquidjs": "^9.16.1",
"lodash": "^4.17.20",
"lunr": "^2.3.9",
"moment": "^2.27.0",
"msal": "^1.3.4",
"prismjs": "^1.21.0",
"remark": "^12.0.1",
"remark-html": "^12.0.0",
"moment": "^2.29.1",
"msal": "^1.4.1",
"prismjs": "^1.22.0",
"remark": "^13.0.0",
"remark-html": "^13.0.1",
"slick": "^1.12.2",
"topojson-client": "^3.1.0",
"truncate-html": "^1.0.3",
Expand Down
4 changes: 2 additions & 2 deletions src/apim.runtime.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { RouteHelper } from "./routing/routeHelper";
import { IInjector, IInjectorModule } from "@paperbits/common/injection";
import { DefaultEventManager } from "@paperbits/common/events";
import { XmlHttpRequestClient } from "@paperbits/common/http";
import { SettingsProvider } from "@paperbits/common/configuration";
import { DefaultSettingsProvider } from "@paperbits/common/configuration";
import { DefaultRouter, LocationRouteHandler, HistoryRouteHandler } from "@paperbits/common/routing";
import { ConsoleLogger } from "@paperbits/common/logging";
import { KnockoutRegistrationLoaders } from "@paperbits/core/ko/knockout.loaders";
Expand Down Expand Up @@ -125,7 +125,7 @@ export class ApimRuntimeModule implements IInjectorModule {
injector.bindSingleton("aadService", AadService);
injector.bindSingleton("mapiClient", MapiClient);
injector.bindSingleton("httpClient", XmlHttpRequestClient);
injector.bindSingleton("settingsProvider", SettingsProvider);
injector.bindSingleton("settingsProvider", DefaultSettingsProvider);
injector.bindSingleton("authenticator", DefaultAuthenticator);
injector.bindSingleton("routeHelper", RouteHelper);
injector.bindSingleton("userService", StaticUserService);
Expand Down
17 changes: 12 additions & 5 deletions src/authentication/accessToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class AccessToken {
public readonly userId?: string) {
}

private static parseHeaderValue(value: string): AccessToken {
private static parseExtendedSharedAccessSignature(value: string): AccessToken {
const regex = /token=\"(.*==)\"/gm;
const match = regex.exec(value);

Expand Down Expand Up @@ -67,19 +67,26 @@ export class AccessToken {
}

if (token.startsWith("SharedAccessSignature ")) {
return AccessToken.parseSharedAccessSignature(token.replace("SharedAccessSignature ", ""));
const value = token.replace("SharedAccessSignature ", "");

if (value.startsWith("token=")) {
return AccessToken.parseExtendedSharedAccessSignature(value);
}
else {
return AccessToken.parseSharedAccessSignature(value);
}
}

if (token.startsWith("token=")) {
return AccessToken.parseHeaderValue(token);
return AccessToken.parseExtendedSharedAccessSignature(token);
}

const result = AccessToken.parseSharedAccessSignature(token);

if (result) {
return result;
}

throw new Error(`Access token format is not valid. Please use "Bearer" or "SharedAccessSignature".`);
}

Expand All @@ -90,6 +97,6 @@ export class AccessToken {
}

public toString(): string {
return `${this.type} ${this.value}`;
return `${this.type} token="${this.value}",refresh="true"`;
}
}
Loading

0 comments on commit abd018b

Please sign in to comment.