Skip to content

Commit

Permalink
Merge pull request #1499 from AzureAD/export-utils
Browse files Browse the repository at this point in the history
Export WindowUtils, UrlUtils, and redirect callback types for MSAL Angular
  • Loading branch information
jasonnutter committed Apr 17, 2020
2 parents f8a71d0 + db8ac25 commit 52d43d7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
4 changes: 1 addition & 3 deletions lib/msal-angular/src/msal-guard.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
import { MsalService } from "./msal.service";
import { Location, PlatformLocation } from "@angular/common";
import { BroadcastService } from "./broadcast.service";
import { Configuration, AuthResponse, AuthError, InteractionRequiredAuthError } from "msal";
import { Configuration, AuthError, InteractionRequiredAuthError, UrlUtils, WindowUtils } from "msal";
import { MsalAngularConfiguration } from "./msal-angular.configuration";
import { MSAL_CONFIG, MSAL_CONFIG_ANGULAR } from "./constants";
import { UrlUtils } from "msal/lib-commonjs/utils/UrlUtils";
import { WindowUtils } from "msal/lib-commonjs/utils/WindowUtils";

@Injectable()
export class MsalGuard implements CanActivate {
Expand Down
20 changes: 7 additions & 13 deletions lib/msal-angular/src/msal.service.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import {Inject, Injectable, InjectionToken} from "@angular/core";
import { Inject, Injectable } from "@angular/core";
import {
UserAgentApplication,
Configuration,
AuthenticationParameters,
AuthResponse,
AuthError,
Logger
authResponseCallback,
errorReceivedCallback,
tokenReceivedCallback,
UrlUtils
} from "msal";
import {
Router
} from "@angular/router";
import { Router } from "@angular/router";
import {BroadcastService} from "./broadcast.service";
import {MSALError} from "./MSALError";
import { AuthCache } from "msal/lib-commonjs/cache/AuthCache";
import { MSALError } from "./MSALError";
import { MsalAngularConfiguration } from "./msal-angular.configuration";
import { authResponseCallback, errorReceivedCallback, tokenReceivedCallback } from "msal/lib-commonjs/UserAgentApplication";
import { UrlUtils } from "msal/lib-commonjs/utils/UrlUtils";
import { MSAL_CONFIG, MSAL_CONFIG_ANGULAR } from "./constants";

const buildMsalConfig = (config: Configuration) : Configuration => {
Expand Down Expand Up @@ -82,10 +80,6 @@ export class MsalService extends UserAgentApplication {
return (typeof str === "undefined" || !str || 0 === str.length);
}

public getCacheStorage(): AuthCache {
return this.cacheStorage;
}

public loginPopup(request?: AuthenticationParameters): Promise<any> {
return super.loginPopup(request)
.then((authResponse: AuthResponse) => {
Expand Down
4 changes: 3 additions & 1 deletion lib/msal-core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { UserAgentApplication } from "./UserAgentApplication";
export { UserAgentApplication, authResponseCallback, errorReceivedCallback, tokenReceivedCallback } from "./UserAgentApplication";
export { Logger } from "./Logger";
export { LogLevel } from "./Logger";
export { Account } from "./Account";
Expand All @@ -9,6 +9,8 @@ export { CacheLocation, Configuration } from "./Configuration";
export { AuthenticationParameters } from "./AuthenticationParameters";
export { AuthResponse } from "./AuthResponse";
export { CryptoUtils } from "./utils/CryptoUtils";
export { UrlUtils } from "./utils/UrlUtils";
export { WindowUtils } from "./utils/WindowUtils";

// Errors
export { AuthError } from "./error/AuthError";
Expand Down

0 comments on commit 52d43d7

Please sign in to comment.