Skip to content

Commit 504d352

Browse files
authored
Merge pull request #1582 from AzureAD/cloud-discovery
Use instance discovery for trusted hosts and combine authority classes
2 parents 8c86372 + 84dd6a2 commit 504d352

29 files changed

+636
-548
lines changed

lib/msal-angularjs/package-lock.json

+40-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/msal-core/src/UserAgentApplication.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import { Constants,
4444
FramePrefix
4545
} from "./utils/Constants";
4646
import { CryptoUtils } from "./utils/CryptoUtils";
47+
import { TrustedAuthority } from "./authority/TrustedAuthority";
4748

4849
// default authority
4950
const DEFAULT_AUTHORITY = "https://login.microsoftonline.com/common";
@@ -219,7 +220,7 @@ export class UserAgentApplication {
219220

220221
this.telemetryManager = this.getTelemetryManagerFromConfig(this.config.system.telemetry, this.clientId);
221222

222-
AuthorityFactory.setKnownAuthorities(this.config.auth.validateAuthority, this.config.auth.knownAuthorities);
223+
TrustedAuthority.setTrustedAuthoritiesFromConfig(this.config.auth.validateAuthority, this.config.auth.knownAuthorities);
223224
AuthorityFactory.saveMetadataFromConfig(this.config.auth.authority, this.config.auth.authorityMetadata);
224225

225226
// if no authority is passed, set the default: "https://login.microsoftonline.com/common"

lib/msal-core/src/XHRClient.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Licensed under the MIT License.
44
*/
55

6+
import { NetworkRequestType } from "./utils/Constants";
7+
68
/**
79
* XHR client for JSON endpoints
810
* https://www.npmjs.com/package/async-promise
@@ -43,7 +45,7 @@ export class XhrClient {
4345
reject(xhr.status);
4446
};
4547

46-
if (method === "GET") {
48+
if (method === NetworkRequestType.GET) {
4749
xhr.send();
4850
}
4951
else {

lib/msal-core/src/authority/AadAuthority.ts

-65
This file was deleted.

0 commit comments

Comments
 (0)