Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f3b6117
Port changes from msal-core
tnorling Jun 5, 2020
7ae8baf
Merge branch 'dev' of https://github.com/AzureAD/microsoft-authentica…
tnorling Jun 18, 2020
6025e84
Add support for preferred_cache and preferred_network
tnorling Jun 18, 2020
7872ca2
Update references to old temp constant
tnorling Jun 18, 2020
dcaff8e
Merge branch 'dev' of https://github.com/AzureAD/microsoft-authentica…
tnorling Jun 18, 2020
a71e396
Cleanup getInstanceMetadata
tnorling Jun 18, 2020
b9d4e62
Cleanup
tnorling Jun 18, 2020
9d10e65
Update node and browser
tnorling Jun 18, 2020
2600876
Adding code for instance_aware authentication in msal-browser
pkanher617 Jun 19, 2020
5307fa8
Adding graph hostname and graph host to the auth result
pkanher617 Jun 19, 2020
710075d
Adding AuthCodePayload object
pkanher617 Jun 19, 2020
d96595f
Rename AuthCodeResponse file
pkanher617 Jun 19, 2020
b2c6aa7
Update PublicClientApplication.ts
pkanher617 Jun 19, 2020
53de8da
adding instance aware sample
pkanher617 Jun 19, 2020
171d4d0
Remove policy from createAccount
tnorling Jun 19, 2020
570b361
Update environment for adfs
tnorling Jun 19, 2020
55f7be5
All common tests passing
tnorling Jun 19, 2020
4aead0a
Browser tests passing
tnorling Jun 19, 2020
4f15a91
Add tests
tnorling Jun 19, 2020
4662361
Merge branch 'instance-aware-2.0' of https://github.com/AzureAD/micro…
tnorling Jun 19, 2020
0dddb02
Add error
tnorling Jun 19, 2020
ed17743
Update untrustedAuthority error message
tnorling Jun 19, 2020
27b0530
Address feedback
tnorling Jun 20, 2020
f939af1
Address feedback
tnorling Jun 20, 2020
045acbe
Revert VScode settings
tnorling Jun 20, 2020
da430bd
Revert VScode settings
tnorling Jun 20, 2020
663e604
Add performance doc
tnorling Jun 22, 2020
4d35732
Add performance doc
tnorling Jun 22, 2020
811121a
Revert "Add performance doc"
tnorling Jun 22, 2020
d4686bd
Revert "Add performance doc"
tnorling Jun 22, 2020
5552d53
Revert "Revert VScode settings"
tnorling Jun 22, 2020
d678d50
Revert "Revert VScode settings"
tnorling Jun 22, 2020
30a8394
Revert "Address feedback"
tnorling Jun 22, 2020
c5a88a9
Revert "Address feedback"
tnorling Jun 22, 2020
842a292
Revert "Update untrustedAuthority error message"
tnorling Jun 22, 2020
d89d5c6
Revert "Add error"
tnorling Jun 22, 2020
c326777
Revert "Merge branch 'instance-aware-2.0' of https://github.com/Azure…
tnorling Jun 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update node and browser
  • Loading branch information
tnorling committed Jun 18, 2020
commit 9d10e650e395147082b6f4fe5af51576798b17db
4 changes: 2 additions & 2 deletions lib/msal-browser/src/app/PublicClientApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
Authority,
AuthorityFactory,
InteractionRequiredAuthError,
B2cAuthority,
TrustedAuthority,
AuthorizationUrlRequest,
PersistentCacheKeys,
IdToken,
Expand Down Expand Up @@ -101,7 +101,7 @@ export class PublicClientApplication {
this.browserStorage = new BrowserStorage(this.config.auth.clientId, this.config.cache);

// Initialize default authority instance
B2cAuthority.setKnownAuthorities(this.config.auth.knownAuthorities);
TrustedAuthority.setTrustedAuthoritiesFromConfig(this.config.auth.knownAuthorities, this.config.auth.instanceMetadata);

this.defaultAuthorityInstance = AuthorityFactory.createInstance(
this.config.auth.authority,
Expand Down
4 changes: 3 additions & 1 deletion lib/msal-browser/src/config/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { SystemOptions, LoggerOptions, INetworkModule, LogLevel, DEFAULT_SYSTEM_OPTIONS, Constants } from "@azure/msal-common";
import { SystemOptions, LoggerOptions, INetworkModule, LogLevel, DEFAULT_SYSTEM_OPTIONS, Constants, IInstanceDiscoveryMetadata } from "@azure/msal-common";
import { BrowserUtils } from "../utils/BrowserUtils";
import { BrowserConstants } from "../utils/BrowserConstants";

Expand All @@ -14,6 +14,7 @@ export type BrowserAuthOptions = {
clientId: string;
authority?: string;
knownAuthorities?: Array<string>;
instanceMetadata?: Array<IInstanceDiscoveryMetadata>;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming here might get confusing when we implement the other perf changes which introduced authorityMetadata in msal-core. Open to suggestions for a better name here.

redirectUri?: string | (() => string);
postLogoutRedirectUri?: string | (() => string);
navigateToLoginRequestUrl?: boolean;
Expand Down Expand Up @@ -67,6 +68,7 @@ const DEFAULT_AUTH_OPTIONS: BrowserAuthOptions = {
clientId: "",
authority: `${Constants.DEFAULT_AUTHORITY}/`,
knownAuthorities: [],
instanceMetadata: [],
redirectUri: () => BrowserUtils.getCurrentUri(),
postLogoutRedirectUri: () => BrowserUtils.getCurrentUri(),
navigateToLoginRequestUrl: true
Expand Down
2 changes: 1 addition & 1 deletion lib/msal-common/src/authority/TrustedAuthority.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class TrustedAuthority {
* @param knownAuthorities
* @param instanceMetadata
*/
public static setTrustedAuthoritiesFromConfig(knownAuthorities: Array<string>, instanceMetadata: Array<IInstanceDiscoveryMetadata>) {
public static setTrustedAuthoritiesFromConfig(knownAuthorities: Array<string>, instanceMetadata: Array<IInstanceDiscoveryMetadata>): void {
if (!this.getTrustedHostList().length){
if (knownAuthorities.length && instanceMetadata.length) {
// TODO Put better error here
Expand Down
1 change: 1 addition & 0 deletions lib/msal-common/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export { IdToken } from "./account/IdToken";
export { IdTokenClaims } from "./account/IdTokenClaims";
// Authority
export { Authority } from "./authority/Authority";
export { IInstanceDiscoveryMetadata } from "./authority/IInstanceDiscoveryMetadata";
export { TrustedAuthority } from "./authority/TrustedAuthority";
export { AuthorityFactory } from "./authority/AuthorityFactory";
export { AuthorityType } from "./authority/AuthorityType";
Expand Down
4 changes: 2 additions & 2 deletions lib/msal-node/src/client/ClientApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
AuthorityFactory,
ClientAuthError,
Constants,
B2cAuthority,
TrustedAuthority,
IAccount,
BaseAuthRequest
} from '@azure/msal-common';
Expand Down Expand Up @@ -44,7 +44,7 @@ export abstract class ClientApplication {

this.cryptoProvider = new CryptoProvider();
this.storage = new Storage(this.config.cache!);
B2cAuthority.setKnownAuthorities(this.config.auth.knownAuthorities!);
TrustedAuthority.setTrustedAuthoritiesFromConfig(this.config.auth.knownAuthorities!, this.config.auth.instanceMetadata!);
this.cacheContext = new CacheContext();
}

Expand Down
5 changes: 4 additions & 1 deletion lib/msal-node/src/config/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import {
LoggerOptions,
INetworkModule,
LogLevel
LogLevel,
IInstanceDiscoveryMetadata
} from '@azure/msal-common';
import { NetworkUtils } from '../utils/NetworkUtils';
import { CACHE } from '../utils/Constants';
Expand All @@ -21,6 +22,7 @@ export type NodeAuthOptions = {
clientId: string;
authority?: string;
knownAuthorities?: Array<string>;
instanceMetadata?: Array<IInstanceDiscoveryMetadata>;
};

/**
Expand Down Expand Up @@ -64,6 +66,7 @@ const DEFAULT_AUTH_OPTIONS: NodeAuthOptions = {
clientId: '',
authority: '',
knownAuthorities: [],
instanceMetadata: []
};

const DEFAULT_CACHE_OPTIONS: CacheOptions = {
Expand Down