@azure/msal-angular
Advanced tools
Comparing version 2.3.3 to 2.4.0
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"MsalService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":24,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":30,"character":9},"arguments":[{"__symbolic":"reference","name":"MSAL_INSTANCE"}]}],null],"parameters":[{"__symbolic":"reference","module":"@azure/msal-browser","name":"IPublicClientApplication","line":30,"character":48},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":31,"character":26}]}],"initialize":[{"__symbolic":"method"}],"acquireTokenPopup":[{"__symbolic":"method"}],"acquireTokenRedirect":[{"__symbolic":"method"}],"acquireTokenSilent":[{"__symbolic":"method"}],"handleRedirectObservable":[{"__symbolic":"method"}],"loginPopup":[{"__symbolic":"method"}],"loginRedirect":[{"__symbolic":"method"}],"logout":[{"__symbolic":"method"}],"logoutRedirect":[{"__symbolic":"method"}],"logoutPopup":[{"__symbolic":"method"}],"ssoSilent":[{"__symbolic":"method"}],"getLogger":[{"__symbolic":"method"}],"setLogger":[{"__symbolic":"method"}]}},"IMsalService":{"__symbolic":"interface"},"MsalGuard":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":16,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":21,"character":9},"arguments":[{"__symbolic":"reference","name":"MSAL_GUARD_CONFIG"}]}],null,null,null,null],"parameters":[{"__symbolic":"reference","name":"MsalGuardConfiguration"},{"__symbolic":"reference","name":"MsalBroadcastService"},{"__symbolic":"reference","name":"MsalService"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":24,"character":26},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":25,"character":24}]}],"parseUrl":[{"__symbolic":"method"}],"getDestinationUrl":[{"__symbolic":"method"}],"loginInteractively":[{"__symbolic":"method"}],"activateHelper":[{"__symbolic":"method"}],"includesCode":[{"__symbolic":"method"}],"canActivate":[{"__symbolic":"method"}],"canActivateChild":[{"__symbolic":"method"}],"canLoad":[{"__symbolic":"method"}]}},"MsalGuardConfiguration":{"__symbolic":"interface"},"MsalGuardAuthRequest":{"__symbolic":"interface"},"MsalInterceptor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":20,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":25,"character":9},"arguments":[{"__symbolic":"reference","name":"MSAL_INTERCEPTOR_CONFIG"}]}],null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":29,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":29,"character":16}]}]],"parameters":[{"__symbolic":"reference","name":"MsalInterceptorConfiguration"},{"__symbolic":"reference","name":"MsalService"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":27,"character":26},{"__symbolic":"reference","name":"any"}]}],"intercept":[{"__symbolic":"method"}],"acquireTokenInteractively":[{"__symbolic":"method"}],"getScopesForEndpoint":[{"__symbolic":"method"}],"matchResourcesToEndpoint":[{"__symbolic":"method"}],"getAbsoluteUrl":[{"__symbolic":"method"}],"matchScopesToEndpoint":[{"__symbolic":"method"}]}},"MsalInterceptorConfiguration":{"__symbolic":"interface"},"MsalInterceptorAuthRequest":{"__symbolic":"interface"},"ProtectedResourceScopes":{"__symbolic":"interface"},"MSAL_INSTANCE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":7,"character":33},"arguments":["MSAL_INSTANCE"]},"MSAL_GUARD_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":9,"character":37},"arguments":["MSAL_GUARD_CONFIG"]},"MSAL_INTERCEPTOR_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":11,"character":43},"arguments":["MSAL_INTERCEPTOR_CONFIG"]},"MsalBroadcastService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":11,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":19,"character":9},"arguments":[{"__symbolic":"reference","name":"MSAL_INSTANCE"}]}],null],"parameters":[{"__symbolic":"reference","module":"@azure/msal-browser","name":"IPublicClientApplication","line":19,"character":53},{"__symbolic":"reference","name":"MsalService"}]}]}},"MsalModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":16,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MsalRedirectComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":19,"character":8}],"providers":[{"__symbolic":"reference","name":"MsalGuard"},{"__symbolic":"reference","name":"MsalBroadcastService"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["msalInstance","guardConfig","interceptorConfig"],"value":{"ngModule":{"__symbolic":"reference","name":"MsalModule"},"providers":[{"provide":{"__symbolic":"reference","name":"MSAL_INSTANCE"},"useValue":{"__symbolic":"reference","name":"msalInstance"}},{"provide":{"__symbolic":"reference","name":"MSAL_GUARD_CONFIG"},"useValue":{"__symbolic":"reference","name":"guardConfig"}},{"provide":{"__symbolic":"reference","name":"MSAL_INTERCEPTOR_CONFIG"},"useValue":{"__symbolic":"reference","name":"interceptorConfig"}},{"__symbolic":"reference","name":"MsalService"}]}}}},"MsalRedirectComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":15,"character":1},"arguments":[{"selector":"app-redirect","template":""}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"MsalService"}]}],"ngOnInit":[{"__symbolic":"method"}]}},"MsalCustomNavigationClient":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@azure/msal-browser","name":"NavigationClient","line":17,"character":48},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":16,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"MsalService"},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":21,"character":24},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":22,"character":26}]}],"navigateInternal":[{"__symbolic":"method"}]}},"version":"2.3.3"},"origins":{"MsalService":"./msal.service","IMsalService":"./IMsalService","MsalGuard":"./msal.guard","MsalGuardConfiguration":"./msal.guard.config","MsalGuardAuthRequest":"./msal.guard.config","MsalInterceptor":"./msal.interceptor","MsalInterceptorConfiguration":"./msal.interceptor.config","MsalInterceptorAuthRequest":"./msal.interceptor.config","ProtectedResourceScopes":"./msal.interceptor.config","MSAL_INSTANCE":"./constants","MSAL_GUARD_CONFIG":"./constants","MSAL_INTERCEPTOR_CONFIG":"./constants","MsalBroadcastService":"./msal.broadcast.service","MsalModule":"./msal.module","MsalRedirectComponent":"./msal.redirect.component","MsalCustomNavigationClient":"./msal.navigation.client","version":"./packageMetadata"},"importAs":"@azure/msal-angular"} | ||
{"__symbolic":"module","version":4,"metadata":{"MsalService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":24,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":30,"character":9},"arguments":[{"__symbolic":"reference","name":"MSAL_INSTANCE"}]}],null],"parameters":[{"__symbolic":"reference","module":"@azure/msal-browser","name":"IPublicClientApplication","line":30,"character":48},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":31,"character":26}]}],"initialize":[{"__symbolic":"method"}],"acquireTokenPopup":[{"__symbolic":"method"}],"acquireTokenRedirect":[{"__symbolic":"method"}],"acquireTokenSilent":[{"__symbolic":"method"}],"handleRedirectObservable":[{"__symbolic":"method"}],"loginPopup":[{"__symbolic":"method"}],"loginRedirect":[{"__symbolic":"method"}],"logout":[{"__symbolic":"method"}],"logoutRedirect":[{"__symbolic":"method"}],"logoutPopup":[{"__symbolic":"method"}],"ssoSilent":[{"__symbolic":"method"}],"getLogger":[{"__symbolic":"method"}],"setLogger":[{"__symbolic":"method"}]}},"IMsalService":{"__symbolic":"interface"},"MsalGuard":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":16,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":21,"character":9},"arguments":[{"__symbolic":"reference","name":"MSAL_GUARD_CONFIG"}]}],null,null,null,null],"parameters":[{"__symbolic":"reference","name":"MsalGuardConfiguration"},{"__symbolic":"reference","name":"MsalBroadcastService"},{"__symbolic":"reference","name":"MsalService"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":24,"character":26},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":25,"character":24}]}],"parseUrl":[{"__symbolic":"method"}],"getDestinationUrl":[{"__symbolic":"method"}],"loginInteractively":[{"__symbolic":"method"}],"activateHelper":[{"__symbolic":"method"}],"includesCode":[{"__symbolic":"method"}],"canActivate":[{"__symbolic":"method"}],"canActivateChild":[{"__symbolic":"method"}],"canLoad":[{"__symbolic":"method"}]}},"MsalGuardConfiguration":{"__symbolic":"interface"},"MsalGuardAuthRequest":{"__symbolic":"interface"},"MsalInterceptor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":20,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":25,"character":9},"arguments":[{"__symbolic":"reference","name":"MSAL_INTERCEPTOR_CONFIG"}]}],null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":29,"character":9},"arguments":[{"__symbolic":"reference","module":"@angular/common","name":"DOCUMENT","line":29,"character":16}]}]],"parameters":[{"__symbolic":"reference","name":"MsalInterceptorConfiguration"},{"__symbolic":"reference","name":"MsalService"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":27,"character":26},{"__symbolic":"reference","name":"any"}]}],"intercept":[{"__symbolic":"method"}],"acquireTokenInteractively":[{"__symbolic":"method"}],"getScopesForEndpoint":[{"__symbolic":"method"}],"matchResourcesToEndpoint":[{"__symbolic":"method"}],"getAbsoluteUrl":[{"__symbolic":"method"}],"matchScopesToEndpoint":[{"__symbolic":"method"}]}},"MsalInterceptorConfiguration":{"__symbolic":"interface"},"MsalInterceptorAuthRequest":{"__symbolic":"interface"},"ProtectedResourceScopes":{"__symbolic":"interface"},"MSAL_INSTANCE":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":7,"character":33},"arguments":["MSAL_INSTANCE"]},"MSAL_GUARD_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":9,"character":37},"arguments":["MSAL_GUARD_CONFIG"]},"MSAL_INTERCEPTOR_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":11,"character":43},"arguments":["MSAL_INTERCEPTOR_CONFIG"]},"MSAL_BROADCAST_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":13,"character":41},"arguments":["MSAL_BROADCAST_CONFIG"]},"MsalBroadcastService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":12,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":20,"character":9},"arguments":[{"__symbolic":"reference","name":"MSAL_INSTANCE"}]}],null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":22,"character":9}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":22,"character":21},"arguments":[{"__symbolic":"reference","name":"MSAL_BROADCAST_CONFIG"}]}]],"parameters":[{"__symbolic":"reference","module":"@azure/msal-browser","name":"IPublicClientApplication","line":20,"character":53},{"__symbolic":"reference","name":"MsalService"},{"__symbolic":"reference","name":"MsalBroadcastConfiguration"}]}]}},"MsalBroadcastConfiguration":{"__symbolic":"interface"},"MsalModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":16,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MsalRedirectComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":19,"character":8}],"providers":[{"__symbolic":"reference","name":"MsalGuard"},{"__symbolic":"reference","name":"MsalBroadcastService"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":["msalInstance","guardConfig","interceptorConfig"],"value":{"ngModule":{"__symbolic":"reference","name":"MsalModule"},"providers":[{"provide":{"__symbolic":"reference","name":"MSAL_INSTANCE"},"useValue":{"__symbolic":"reference","name":"msalInstance"}},{"provide":{"__symbolic":"reference","name":"MSAL_GUARD_CONFIG"},"useValue":{"__symbolic":"reference","name":"guardConfig"}},{"provide":{"__symbolic":"reference","name":"MSAL_INTERCEPTOR_CONFIG"},"useValue":{"__symbolic":"reference","name":"interceptorConfig"}},{"__symbolic":"reference","name":"MsalService"}]}}}},"MsalRedirectComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":15,"character":1},"arguments":[{"selector":"app-redirect","template":""}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"MsalService"}]}],"ngOnInit":[{"__symbolic":"method"}]}},"MsalCustomNavigationClient":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@azure/msal-browser","name":"NavigationClient","line":17,"character":48},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":16,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"MsalService"},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":21,"character":24},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":22,"character":26}]}],"navigateInternal":[{"__symbolic":"method"}]}},"version":"2.4.0"},"origins":{"MsalService":"./msal.service","IMsalService":"./IMsalService","MsalGuard":"./msal.guard","MsalGuardConfiguration":"./msal.guard.config","MsalGuardAuthRequest":"./msal.guard.config","MsalInterceptor":"./msal.interceptor","MsalInterceptorConfiguration":"./msal.interceptor.config","MsalInterceptorAuthRequest":"./msal.interceptor.config","ProtectedResourceScopes":"./msal.interceptor.config","MSAL_INSTANCE":"./constants","MSAL_GUARD_CONFIG":"./constants","MSAL_INTERCEPTOR_CONFIG":"./constants","MSAL_BROADCAST_CONFIG":"./constants","MsalBroadcastService":"./msal.broadcast.service","MsalBroadcastConfiguration":"./msal.broadcast.config","MsalModule":"./msal.module","MsalRedirectComponent":"./msal.redirect.component","MsalCustomNavigationClient":"./msal.navigation.client","version":"./packageMetadata"},"importAs":"@azure/msal-angular"} |
@@ -14,6 +14,7 @@ (function (global, factory) { | ||
var MSAL_INTERCEPTOR_CONFIG = new core.InjectionToken("MSAL_INTERCEPTOR_CONFIG"); | ||
var MSAL_BROADCAST_CONFIG = new core.InjectionToken("MSAL_BROADCAST_CONFIG"); | ||
/* eslint-disable header/header */ | ||
var name = "@azure/msal-angular"; | ||
var version = "2.3.3"; | ||
var version = "2.4.0"; | ||
@@ -97,7 +98,16 @@ /* | ||
var MsalBroadcastService = /** @class */ (function () { | ||
function MsalBroadcastService(msalInstance, authService) { | ||
function MsalBroadcastService(msalInstance, authService, msalBroadcastConfig) { | ||
var _this = this; | ||
this.msalInstance = msalInstance; | ||
this.authService = authService; | ||
this._msalSubject = new rxjs.Subject(); | ||
this.msalBroadcastConfig = msalBroadcastConfig; | ||
// Make _msalSubject a ReplaySubject if configured to replay past events | ||
if (this.msalBroadcastConfig && this.msalBroadcastConfig.eventsToReplay > 0) { | ||
this.authService.getLogger().verbose("BroadcastService - replayPastEvents set on BroadcastConfig, replaying the last " + this.msalBroadcastConfig.eventsToReplay + " events"); | ||
this._msalSubject = new rxjs.ReplaySubject(this.msalBroadcastConfig.eventsToReplay); | ||
} | ||
else { | ||
// Defaults to _msalSubject being a Subject | ||
this._msalSubject = new rxjs.Subject(); | ||
} | ||
this.msalSubject$ = this._msalSubject.asObservable(); | ||
@@ -123,3 +133,4 @@ // InProgress as BehaviorSubject so most recent inProgress state will be available upon subscription | ||
{ type: undefined, decorators: [{ type: core.Inject, args: [MSAL_INSTANCE,] }] }, | ||
{ type: MsalService } | ||
{ type: MsalService }, | ||
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [MSAL_BROADCAST_CONFIG,] }] } | ||
]; }; | ||
@@ -583,3 +594,3 @@ | ||
/*! ***************************************************************************** | ||
/****************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
@@ -746,3 +757,7 @@ | ||
k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function () { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function (o, m, k, k2) { | ||
@@ -902,2 +917,7 @@ if (k2 === undefined) | ||
} | ||
function __classPrivateFieldIn(state, receiver) { | ||
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) | ||
throw new TypeError("Cannot use 'in' operator on non-object"); | ||
return typeof state === "function" ? receiver === state : state.has(receiver); | ||
} | ||
@@ -961,2 +981,3 @@ /** | ||
exports.MSAL_BROADCAST_CONFIG = MSAL_BROADCAST_CONFIG; | ||
exports.MSAL_GUARD_CONFIG = MSAL_GUARD_CONFIG; | ||
@@ -963,0 +984,0 @@ exports.MSAL_INSTANCE = MSAL_INSTANCE; |
@@ -1,17 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@azure/msal-browser"),require("rxjs"),require("@angular/router"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@azure/msal-angular",["exports","@angular/core","@angular/common","@azure/msal-browser","rxjs","@angular/router","rxjs/operators"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).azure=e.azure||{},e.azure["msal-angular"]={}),e.ng.core,e.ng.common,e["@azure/msal-browser"],e.rxjs,e.ng.router,e.rxjs.operators)}(this,(function(e,t,r,o,n,i,a){"use strict";var s=new t.InjectionToken("MSAL_INSTANCE"),c=new t.InjectionToken("MSAL_GUARD_CONFIG"),u=new t.InjectionToken("MSAL_INTERCEPTOR_CONFIG"),l="@azure/msal-angular",p="2.3.3",g=function(){function e(e,t){this.instance=e,this.location=t;var r=this.location.path(!0).split("#").pop();r&&(this.redirectHash="#"+r),this.instance.initializeWrapperLibrary(o.WrapperSKU.Angular,p)}return e.prototype.initialize=function(){return n.from(this.instance.initialize())},e.prototype.acquireTokenPopup=function(e){return n.from(this.instance.acquireTokenPopup(e))},e.prototype.acquireTokenRedirect=function(e){return n.from(this.instance.acquireTokenRedirect(e))},e.prototype.acquireTokenSilent=function(e){return n.from(this.instance.acquireTokenSilent(e))},e.prototype.handleRedirectObservable=function(e){return n.from(this.instance.handleRedirectPromise(e||this.redirectHash))},e.prototype.loginPopup=function(e){return n.from(this.instance.loginPopup(e))},e.prototype.loginRedirect=function(e){return n.from(this.instance.loginRedirect(e))},e.prototype.logout=function(e){return n.from(this.instance.logout(e))},e.prototype.logoutRedirect=function(e){return n.from(this.instance.logoutRedirect(e))},e.prototype.logoutPopup=function(e){return n.from(this.instance.logoutPopup(e))},e.prototype.ssoSilent=function(e){return n.from(this.instance.ssoSilent(e))},e.prototype.getLogger=function(){return this.logger||(this.logger=this.instance.getLogger().clone(l,p)),this.logger},e.prototype.setLogger=function(e){this.logger=e.clone(l,p),this.instance.setLogger(e)},e}();g.decorators=[{type:t.Injectable}],g.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[s]}]},{type:r.Location}]};var h=function(e,t){var r=this;this.msalInstance=e,this.authService=t,this._msalSubject=new n.Subject,this.msalSubject$=this._msalSubject.asObservable(),this._inProgress=new n.BehaviorSubject(o.InteractionStatus.Startup),this.inProgress$=this._inProgress.asObservable(),this.msalInstance.addEventCallback((function(e){r._msalSubject.next(e);var t=o.EventMessageUtils.getInteractionStatusFromEvent(e,r._inProgress.value);null!==t&&(r.authService.getLogger().verbose("BroadcastService - "+e.eventType+" results in setting inProgress from "+r._inProgress.value+" to "+t),r._inProgress.next(t))}))};h.decorators=[{type:t.Injectable}],h.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[s]}]},{type:g}]};var v=function(){function e(e,t,r,o,n){this.msalGuardConfig=e,this.msalBroadcastService=t,this.authService=r,this.location=o,this.router=n,this.msalBroadcastService.inProgress$.subscribe()}return e.prototype.parseUrl=function(e){return this.router.parseUrl(e)},e.prototype.getDestinationUrl=function(e){this.authService.getLogger().verbose("Guard - getting destination url");var t=document.getElementsByTagName("base"),r=this.location.normalize(t.length?t[0].href:window.location.origin),o=this.location.prepareExternalUrl(e);return o.startsWith("#")?(this.authService.getLogger().verbose("Guard - destination by hash routing"),r+"/"+o):""+r+e},e.prototype.loginInteractively=function(e){var t=this,r="function"==typeof this.msalGuardConfig.authRequest?this.msalGuardConfig.authRequest(this.authService,e):Object.assign({},this.msalGuardConfig.authRequest);if(this.msalGuardConfig.interactionType===o.InteractionType.Popup)return this.authService.getLogger().verbose("Guard - logging in by popup"),this.authService.loginPopup(r).pipe(a.map((function(e){return t.authService.getLogger().verbose("Guard - login by popup successful, can activate, setting active account"),t.authService.instance.setActiveAccount(e.account),!0})));this.authService.getLogger().verbose("Guard - logging in by redirect");var n=this.getDestinationUrl(e.url);return this.authService.loginRedirect(Object.assign({redirectStartPage:n},r)).pipe(a.map((function(){return!1})))},e.prototype.activateHelper=function(e){var r=this;if(this.msalGuardConfig.interactionType!==o.InteractionType.Popup&&this.msalGuardConfig.interactionType!==o.InteractionType.Redirect)throw new o.BrowserConfigurationAuthError("invalid_interaction_type","Invalid interaction type provided to MSAL Guard. InteractionType.Popup or InteractionType.Redirect must be provided in the MsalGuardConfiguration");if(this.authService.getLogger().verbose("MSAL Guard activated"),"undefined"==typeof window)return this.authService.getLogger().info("Guard - window is undefined, MSAL does not support server-side token acquisition"),n.of(!0);if(o.UrlString.hashContainsKnownProperties(window.location.hash)&&o.BrowserUtils.isInIframe()&&!this.authService.instance.getConfiguration().system.allowRedirectInIframe)return this.authService.getLogger().warning("Guard - redirectUri set to page with MSAL Guard. It is recommended to not set redirectUri to a page that requires authentication."),n.of(!1);this.msalGuardConfig.loginFailedRoute&&(this.loginFailedRoute=this.parseUrl(this.msalGuardConfig.loginFailedRoute));var i=this.location.path(!0);return this.authService.handleRedirectObservable().pipe(a.concatMap((function(){if(!r.authService.instance.getAllAccounts().length)return e?(r.authService.getLogger().verbose("Guard - no accounts retrieved, log in required to activate"),r.loginInteractively(e)):(r.authService.getLogger().verbose("Guard - no accounts retrieved, no state, cannot load"),n.of(!1));if(r.authService.getLogger().verbose("Guard - at least 1 account exists, can activate or load"),e){var t=r.includesCode(e.url),o=!!e.root&&!!e.root.fragment&&r.includesCode("#"+e.root.fragment),a=0===r.location.prepareExternalUrl(e.url).indexOf("#");if(t&&(o||a))return r.authService.getLogger().info("Guard - Hash contains known code response, stopping navigation."),i.indexOf("#")>-1?n.of(r.parseUrl(r.location.path())):n.of(r.parseUrl(""))}return n.of(!0)})),a.catchError((function(o){return r.authService.getLogger().error("Guard - error while logging in, unable to activate"),r.authService.getLogger().errorPii("Guard - error: "+o.message),r.loginFailedRoute&&parseInt(t.VERSION.major,10)>9&&e?(r.authService.getLogger().verbose("Guard - loginFailedRoute set, redirecting"),n.of(r.loginFailedRoute)):n.of(!1)})))},e.prototype.includesCode=function(e){return e.lastIndexOf("/code")>-1&&e.lastIndexOf("/code")===e.length-"/code".length||e.indexOf("#code=")>-1||e.indexOf("&code=")>-1},e.prototype.canActivate=function(e,t){return this.authService.getLogger().verbose("Guard - canActivate"),this.activateHelper(t)},e.prototype.canActivateChild=function(e,t){return this.authService.getLogger().verbose("Guard - canActivateChild"),this.activateHelper(t)},e.prototype.canLoad=function(){return this.authService.getLogger().verbose("Guard - canLoad"),this.activateHelper()},e}();v.decorators=[{type:t.Injectable}],v.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[c]}]},{type:h},{type:g},{type:r.Location},{type:i.Router}]};var f=function(){function e(e,t,r,o){this.msalInterceptorConfig=e,this.authService=t,this.location=r,this._document=o}return e.prototype.intercept=function(e,t){var r=this;if(this.msalInterceptorConfig.interactionType!==o.InteractionType.Popup&&this.msalInterceptorConfig.interactionType!==o.InteractionType.Redirect)throw new o.BrowserConfigurationAuthError("invalid_interaction_type","Invalid interaction type provided to MSAL Interceptor. InteractionType.Popup, InteractionType.Redirect must be provided in the msalInterceptorConfiguration");this.authService.getLogger().verbose("MSAL Interceptor activated");var i,s=this.getScopesForEndpoint(e.url,e.method);if(!s||0===s.length)return this.authService.getLogger().verbose("Interceptor - no scopes for endpoint"),t.handle(e);this.authService.instance.getActiveAccount()?(this.authService.getLogger().verbose("Interceptor - active account selected"),i=this.authService.instance.getActiveAccount()):(this.authService.getLogger().verbose("Interceptor - no active account, fallback to first account"),i=this.authService.instance.getAllAccounts()[0]);var c="function"==typeof this.msalInterceptorConfig.authRequest?this.msalInterceptorConfig.authRequest(this.authService,e,{account:i}):Object.assign(Object.assign({},this.msalInterceptorConfig.authRequest),{account:i});return this.authService.getLogger().info("Interceptor - "+s.length+" scopes found for endpoint"),this.authService.getLogger().infoPii("Interceptor - ["+s+"] scopes found for "+e.url),this.authService.acquireTokenSilent(Object.assign(Object.assign({},c),{scopes:s,account:i})).pipe(a.catchError((function(){return r.authService.getLogger().error("Interceptor - acquireTokenSilent rejected with error. Invoking interaction to resolve."),r.acquireTokenInteractively(c,s)})),a.switchMap((function(e){return e.accessToken?n.of(e):(r.authService.getLogger().error("Interceptor - acquireTokenSilent resolved with null access token. Known issue with B2C tenants, invoking interaction to resolve."),r.acquireTokenInteractively(c,s))})),a.switchMap((function(o){r.authService.getLogger().verbose("Interceptor - setting authorization headers");var n=e.headers.set("Authorization","Bearer "+o.accessToken),i=e.clone({headers:n});return t.handle(i)})))},e.prototype.acquireTokenInteractively=function(e,t){if(this.msalInterceptorConfig.interactionType===o.InteractionType.Popup)return this.authService.getLogger().verbose("Interceptor - error acquiring token silently, acquiring by popup"),this.authService.acquireTokenPopup(Object.assign(Object.assign({},e),{scopes:t}));this.authService.getLogger().verbose("Interceptor - error acquiring token silently, acquiring by redirect");var r=window.location.href;return this.authService.acquireTokenRedirect(Object.assign(Object.assign({},e),{scopes:t,redirectStartPage:r})),n.EMPTY},e.prototype.getScopesForEndpoint=function(e,t){this.authService.getLogger().verbose("Interceptor - getting scopes for endpoint");var r=this.location.normalize(e),o=Array.from(this.msalInterceptorConfig.protectedResourceMap.keys()),n=this.matchResourcesToEndpoint(o,r);return n.absoluteResources.length>0?this.matchScopesToEndpoint(this.msalInterceptorConfig.protectedResourceMap,n.absoluteResources,t):n.relativeResources.length>0?this.matchScopesToEndpoint(this.msalInterceptorConfig.protectedResourceMap,n.relativeResources,t):null},e.prototype.matchResourcesToEndpoint=function(e,t){var r=this,n={absoluteResources:[],relativeResources:[]};return e.forEach((function(e){var i=r.location.normalize(e);o.StringUtils.matchPattern(i,t)&&n.absoluteResources.push(e);var a=r.getAbsoluteUrl(e),s=new o.UrlString(a).getUrlComponents(),c=r.getAbsoluteUrl(t),u=new o.UrlString(c).getUrlComponents(),l=s.QueryString?s.AbsolutePath+"?"+s.QueryString:r.location.normalize(s.AbsolutePath);s.HostNameAndPort===u.HostNameAndPort&&o.StringUtils.matchPattern(l,c)&&""!==l&&"/*"!==l&&n.relativeResources.push(e)})),n},e.prototype.getAbsoluteUrl=function(e){var t=this._document.createElement("a");return t.href=e,t.href},e.prototype.matchScopesToEndpoint=function(e,t,r){var o=[];return t.forEach((function(t){var n=[],i=e.get(t);null!==i?(i.forEach((function(e){if("string"==typeof e)n.push(e);else{var t=r.toLowerCase();e.httpMethod.toLowerCase()===t&&(null===e.scopes?o.push(null):e.scopes.forEach((function(e){n.push(e)})))}})),n.length>0&&o.push(n)):o.push(null)})),o.length>0?(o.length>1&&this.authService.getLogger().warning("Interceptor - More than 1 matching scopes for endpoint found."),o[0]):null},e}();f.decorators=[{type:t.Injectable}],f.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[u]}]},{type:g},{type:r.Location},{type:void 0,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]}]};var d=function(){function e(e){this.authService=e}return e.prototype.ngOnInit=function(){var e=this;this.authService.getLogger().verbose("MsalRedirectComponent activated"),this.authService.initialize().pipe(a.concatMap((function(){return e.authService.handleRedirectObservable()}))).subscribe()},e}();d.decorators=[{type:t.Component,args:[{selector:"app-redirect",template:""}]}],d.ctorParameters=function(){return[{type:g}]};var y=function(){function e(){}return e.forRoot=function(t,r,o){return{ngModule:e,providers:[{provide:s,useValue:t},{provide:c,useValue:r},{provide:u,useValue:o},g]}},e}();y.decorators=[{type:t.NgModule,args:[{declarations:[d],imports:[r.CommonModule],providers:[v,h]}]}]; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */ | ||
var m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function S(e,t,r,o){return new(r||(r=Promise))((function(n,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))}function b(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&i[0]?o.return:i[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;Object.create;var I=function(e){function t(t,r,o){var n=e.call(this)||this;return n.authService=t,n.router=r,n.location=o,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.navigateInternal=function(t,r){var n=Object.create(null,{navigateInternal:{get:function(){return e.prototype.navigateInternal}}});return S(this,void 0,void 0,(function(){var e,i;return b(this,(function(a){return this.authService.getLogger().trace("MsalCustomNavigationClient called"),this.authService.getLogger().verbose("MsalCustomNavigationClient - navigating"),this.authService.getLogger().verbosePii("MsalCustomNavigationClient - navigating to url: "+t),r.noHistory?[2,n.navigateInternal.call(this,t,r)]:(e=new o.UrlString(t).getUrlComponents(),i=e.QueryString?e.AbsolutePath+"?"+e.QueryString:this.location.normalize(e.AbsolutePath),this.router.navigateByUrl(i,{replaceUrl:r.noHistory}),[2,Promise.resolve(r.noHistory)])}))}))},t}(o.NavigationClient);I.decorators=[{type:t.Injectable}],I.ctorParameters=function(){return[{type:g},{type:i.Router},{type:r.Location}]},e.MSAL_GUARD_CONFIG=c,e.MSAL_INSTANCE=s,e.MSAL_INTERCEPTOR_CONFIG=u,e.MsalBroadcastService=h,e.MsalCustomNavigationClient=I,e.MsalGuard=v,e.MsalInterceptor=f,e.MsalModule=y,e.MsalRedirectComponent=d,e.MsalService=g,e.version=p,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@azure/msal-browser"),require("rxjs"),require("@angular/router"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@azure/msal-angular",["exports","@angular/core","@angular/common","@azure/msal-browser","rxjs","@angular/router","rxjs/operators"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).azure=e.azure||{},e.azure["msal-angular"]={}),e.ng.core,e.ng.common,e["@azure/msal-browser"],e.rxjs,e.ng.router,e.rxjs.operators)}(this,(function(e,t,r,o,n,i,a){"use strict";var s=new t.InjectionToken("MSAL_INSTANCE"),c=new t.InjectionToken("MSAL_GUARD_CONFIG"),u=new t.InjectionToken("MSAL_INTERCEPTOR_CONFIG"),l=new t.InjectionToken("MSAL_BROADCAST_CONFIG"),p="@azure/msal-angular",g="2.4.0",h=function(){function e(e,t){this.instance=e,this.location=t;var r=this.location.path(!0).split("#").pop();r&&(this.redirectHash="#"+r),this.instance.initializeWrapperLibrary(o.WrapperSKU.Angular,g)}return e.prototype.initialize=function(){return n.from(this.instance.initialize())},e.prototype.acquireTokenPopup=function(e){return n.from(this.instance.acquireTokenPopup(e))},e.prototype.acquireTokenRedirect=function(e){return n.from(this.instance.acquireTokenRedirect(e))},e.prototype.acquireTokenSilent=function(e){return n.from(this.instance.acquireTokenSilent(e))},e.prototype.handleRedirectObservable=function(e){return n.from(this.instance.handleRedirectPromise(e||this.redirectHash))},e.prototype.loginPopup=function(e){return n.from(this.instance.loginPopup(e))},e.prototype.loginRedirect=function(e){return n.from(this.instance.loginRedirect(e))},e.prototype.logout=function(e){return n.from(this.instance.logout(e))},e.prototype.logoutRedirect=function(e){return n.from(this.instance.logoutRedirect(e))},e.prototype.logoutPopup=function(e){return n.from(this.instance.logoutPopup(e))},e.prototype.ssoSilent=function(e){return n.from(this.instance.ssoSilent(e))},e.prototype.getLogger=function(){return this.logger||(this.logger=this.instance.getLogger().clone(p,g)),this.logger},e.prototype.setLogger=function(e){this.logger=e.clone(p,g),this.instance.setLogger(e)},e}();h.decorators=[{type:t.Injectable}],h.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[s]}]},{type:r.Location}]};var v=function(e,t,r){var i=this;this.msalInstance=e,this.authService=t,this.msalBroadcastConfig=r,this.msalBroadcastConfig&&this.msalBroadcastConfig.eventsToReplay>0?(this.authService.getLogger().verbose("BroadcastService - replayPastEvents set on BroadcastConfig, replaying the last "+this.msalBroadcastConfig.eventsToReplay+" events"),this._msalSubject=new n.ReplaySubject(this.msalBroadcastConfig.eventsToReplay)):this._msalSubject=new n.Subject,this.msalSubject$=this._msalSubject.asObservable(),this._inProgress=new n.BehaviorSubject(o.InteractionStatus.Startup),this.inProgress$=this._inProgress.asObservable(),this.msalInstance.addEventCallback((function(e){i._msalSubject.next(e);var t=o.EventMessageUtils.getInteractionStatusFromEvent(e,i._inProgress.value);null!==t&&(i.authService.getLogger().verbose("BroadcastService - "+e.eventType+" results in setting inProgress from "+i._inProgress.value+" to "+t),i._inProgress.next(t))}))};v.decorators=[{type:t.Injectable}],v.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[s]}]},{type:h},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[l]}]}]};var d=function(){function e(e,t,r,o,n){this.msalGuardConfig=e,this.msalBroadcastService=t,this.authService=r,this.location=o,this.router=n,this.msalBroadcastService.inProgress$.subscribe()}return e.prototype.parseUrl=function(e){return this.router.parseUrl(e)},e.prototype.getDestinationUrl=function(e){this.authService.getLogger().verbose("Guard - getting destination url");var t=document.getElementsByTagName("base"),r=this.location.normalize(t.length?t[0].href:window.location.origin),o=this.location.prepareExternalUrl(e);return o.startsWith("#")?(this.authService.getLogger().verbose("Guard - destination by hash routing"),r+"/"+o):""+r+e},e.prototype.loginInteractively=function(e){var t=this,r="function"==typeof this.msalGuardConfig.authRequest?this.msalGuardConfig.authRequest(this.authService,e):Object.assign({},this.msalGuardConfig.authRequest);if(this.msalGuardConfig.interactionType===o.InteractionType.Popup)return this.authService.getLogger().verbose("Guard - logging in by popup"),this.authService.loginPopup(r).pipe(a.map((function(e){return t.authService.getLogger().verbose("Guard - login by popup successful, can activate, setting active account"),t.authService.instance.setActiveAccount(e.account),!0})));this.authService.getLogger().verbose("Guard - logging in by redirect");var n=this.getDestinationUrl(e.url);return this.authService.loginRedirect(Object.assign({redirectStartPage:n},r)).pipe(a.map((function(){return!1})))},e.prototype.activateHelper=function(e){var r=this;if(this.msalGuardConfig.interactionType!==o.InteractionType.Popup&&this.msalGuardConfig.interactionType!==o.InteractionType.Redirect)throw new o.BrowserConfigurationAuthError("invalid_interaction_type","Invalid interaction type provided to MSAL Guard. InteractionType.Popup or InteractionType.Redirect must be provided in the MsalGuardConfiguration");if(this.authService.getLogger().verbose("MSAL Guard activated"),"undefined"==typeof window)return this.authService.getLogger().info("Guard - window is undefined, MSAL does not support server-side token acquisition"),n.of(!0);if(o.UrlString.hashContainsKnownProperties(window.location.hash)&&o.BrowserUtils.isInIframe()&&!this.authService.instance.getConfiguration().system.allowRedirectInIframe)return this.authService.getLogger().warning("Guard - redirectUri set to page with MSAL Guard. It is recommended to not set redirectUri to a page that requires authentication."),n.of(!1);this.msalGuardConfig.loginFailedRoute&&(this.loginFailedRoute=this.parseUrl(this.msalGuardConfig.loginFailedRoute));var i=this.location.path(!0);return this.authService.handleRedirectObservable().pipe(a.concatMap((function(){if(!r.authService.instance.getAllAccounts().length)return e?(r.authService.getLogger().verbose("Guard - no accounts retrieved, log in required to activate"),r.loginInteractively(e)):(r.authService.getLogger().verbose("Guard - no accounts retrieved, no state, cannot load"),n.of(!1));if(r.authService.getLogger().verbose("Guard - at least 1 account exists, can activate or load"),e){var t=r.includesCode(e.url),o=!!e.root&&!!e.root.fragment&&r.includesCode("#"+e.root.fragment),a=0===r.location.prepareExternalUrl(e.url).indexOf("#");if(t&&(o||a))return r.authService.getLogger().info("Guard - Hash contains known code response, stopping navigation."),i.indexOf("#")>-1?n.of(r.parseUrl(r.location.path())):n.of(r.parseUrl(""))}return n.of(!0)})),a.catchError((function(o){return r.authService.getLogger().error("Guard - error while logging in, unable to activate"),r.authService.getLogger().errorPii("Guard - error: "+o.message),r.loginFailedRoute&&parseInt(t.VERSION.major,10)>9&&e?(r.authService.getLogger().verbose("Guard - loginFailedRoute set, redirecting"),n.of(r.loginFailedRoute)):n.of(!1)})))},e.prototype.includesCode=function(e){return e.lastIndexOf("/code")>-1&&e.lastIndexOf("/code")===e.length-"/code".length||e.indexOf("#code=")>-1||e.indexOf("&code=")>-1},e.prototype.canActivate=function(e,t){return this.authService.getLogger().verbose("Guard - canActivate"),this.activateHelper(t)},e.prototype.canActivateChild=function(e,t){return this.authService.getLogger().verbose("Guard - canActivateChild"),this.activateHelper(t)},e.prototype.canLoad=function(){return this.authService.getLogger().verbose("Guard - canLoad"),this.activateHelper()},e}();d.decorators=[{type:t.Injectable}],d.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[c]}]},{type:v},{type:h},{type:r.Location},{type:i.Router}]};var f=function(){function e(e,t,r,o){this.msalInterceptorConfig=e,this.authService=t,this.location=r,this._document=o}return e.prototype.intercept=function(e,t){var r=this;if(this.msalInterceptorConfig.interactionType!==o.InteractionType.Popup&&this.msalInterceptorConfig.interactionType!==o.InteractionType.Redirect)throw new o.BrowserConfigurationAuthError("invalid_interaction_type","Invalid interaction type provided to MSAL Interceptor. InteractionType.Popup, InteractionType.Redirect must be provided in the msalInterceptorConfiguration");this.authService.getLogger().verbose("MSAL Interceptor activated");var i,s=this.getScopesForEndpoint(e.url,e.method);if(!s||0===s.length)return this.authService.getLogger().verbose("Interceptor - no scopes for endpoint"),t.handle(e);this.authService.instance.getActiveAccount()?(this.authService.getLogger().verbose("Interceptor - active account selected"),i=this.authService.instance.getActiveAccount()):(this.authService.getLogger().verbose("Interceptor - no active account, fallback to first account"),i=this.authService.instance.getAllAccounts()[0]);var c="function"==typeof this.msalInterceptorConfig.authRequest?this.msalInterceptorConfig.authRequest(this.authService,e,{account:i}):Object.assign(Object.assign({},this.msalInterceptorConfig.authRequest),{account:i});return this.authService.getLogger().info("Interceptor - "+s.length+" scopes found for endpoint"),this.authService.getLogger().infoPii("Interceptor - ["+s+"] scopes found for "+e.url),this.authService.acquireTokenSilent(Object.assign(Object.assign({},c),{scopes:s,account:i})).pipe(a.catchError((function(){return r.authService.getLogger().error("Interceptor - acquireTokenSilent rejected with error. Invoking interaction to resolve."),r.acquireTokenInteractively(c,s)})),a.switchMap((function(e){return e.accessToken?n.of(e):(r.authService.getLogger().error("Interceptor - acquireTokenSilent resolved with null access token. Known issue with B2C tenants, invoking interaction to resolve."),r.acquireTokenInteractively(c,s))})),a.switchMap((function(o){r.authService.getLogger().verbose("Interceptor - setting authorization headers");var n=e.headers.set("Authorization","Bearer "+o.accessToken),i=e.clone({headers:n});return t.handle(i)})))},e.prototype.acquireTokenInteractively=function(e,t){if(this.msalInterceptorConfig.interactionType===o.InteractionType.Popup)return this.authService.getLogger().verbose("Interceptor - error acquiring token silently, acquiring by popup"),this.authService.acquireTokenPopup(Object.assign(Object.assign({},e),{scopes:t}));this.authService.getLogger().verbose("Interceptor - error acquiring token silently, acquiring by redirect");var r=window.location.href;return this.authService.acquireTokenRedirect(Object.assign(Object.assign({},e),{scopes:t,redirectStartPage:r})),n.EMPTY},e.prototype.getScopesForEndpoint=function(e,t){this.authService.getLogger().verbose("Interceptor - getting scopes for endpoint");var r=this.location.normalize(e),o=Array.from(this.msalInterceptorConfig.protectedResourceMap.keys()),n=this.matchResourcesToEndpoint(o,r);return n.absoluteResources.length>0?this.matchScopesToEndpoint(this.msalInterceptorConfig.protectedResourceMap,n.absoluteResources,t):n.relativeResources.length>0?this.matchScopesToEndpoint(this.msalInterceptorConfig.protectedResourceMap,n.relativeResources,t):null},e.prototype.matchResourcesToEndpoint=function(e,t){var r=this,n={absoluteResources:[],relativeResources:[]};return e.forEach((function(e){var i=r.location.normalize(e);o.StringUtils.matchPattern(i,t)&&n.absoluteResources.push(e);var a=r.getAbsoluteUrl(e),s=new o.UrlString(a).getUrlComponents(),c=r.getAbsoluteUrl(t),u=new o.UrlString(c).getUrlComponents(),l=s.QueryString?s.AbsolutePath+"?"+s.QueryString:r.location.normalize(s.AbsolutePath);s.HostNameAndPort===u.HostNameAndPort&&o.StringUtils.matchPattern(l,c)&&""!==l&&"/*"!==l&&n.relativeResources.push(e)})),n},e.prototype.getAbsoluteUrl=function(e){var t=this._document.createElement("a");return t.href=e,t.href},e.prototype.matchScopesToEndpoint=function(e,t,r){var o=[];return t.forEach((function(t){var n=[],i=e.get(t);null!==i?(i.forEach((function(e){if("string"==typeof e)n.push(e);else{var t=r.toLowerCase();e.httpMethod.toLowerCase()===t&&(null===e.scopes?o.push(null):e.scopes.forEach((function(e){n.push(e)})))}})),n.length>0&&o.push(n)):o.push(null)})),o.length>0?(o.length>1&&this.authService.getLogger().warning("Interceptor - More than 1 matching scopes for endpoint found."),o[0]):null},e}();f.decorators=[{type:t.Injectable}],f.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[u]}]},{type:h},{type:r.Location},{type:void 0,decorators:[{type:t.Inject,args:[r.DOCUMENT]}]}]};var y=function(){function e(e){this.authService=e}return e.prototype.ngOnInit=function(){var e=this;this.authService.getLogger().verbose("MsalRedirectComponent activated"),this.authService.initialize().pipe(a.concatMap((function(){return e.authService.handleRedirectObservable()}))).subscribe()},e}();y.decorators=[{type:t.Component,args:[{selector:"app-redirect",template:""}]}],y.ctorParameters=function(){return[{type:h}]};var m=function(){function e(){}return e.forRoot=function(t,r,o){return{ngModule:e,providers:[{provide:s,useValue:t},{provide:c,useValue:r},{provide:u,useValue:o},h]}},e}();m.decorators=[{type:t.NgModule,args:[{declarations:[y],imports:[r.CommonModule],providers:[d,v]}]}];var S=function(e,t){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function b(e,t,r,o){return new(r||(r=Promise))((function(n,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))}function I(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&i[0]?o.return:i[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;Object.create;var C=function(e){function t(t,r,o){var n=e.call(this)||this;return n.authService=t,n.router=r,n.location=o,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}S(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.navigateInternal=function(t,r){var n=Object.create(null,{navigateInternal:{get:function(){return e.prototype.navigateInternal}}});return b(this,void 0,void 0,(function(){var e,i;return I(this,(function(a){return this.authService.getLogger().trace("MsalCustomNavigationClient called"),this.authService.getLogger().verbose("MsalCustomNavigationClient - navigating"),this.authService.getLogger().verbosePii("MsalCustomNavigationClient - navigating to url: "+t),r.noHistory?[2,n.navigateInternal.call(this,t,r)]:(e=new o.UrlString(t).getUrlComponents(),i=e.QueryString?e.AbsolutePath+"?"+e.QueryString:this.location.normalize(e.AbsolutePath),this.router.navigateByUrl(i,{replaceUrl:r.noHistory}),[2,Promise.resolve(r.noHistory)])}))}))},t}(o.NavigationClient);C.decorators=[{type:t.Injectable}],C.ctorParameters=function(){return[{type:h},{type:i.Router},{type:r.Location}]},e.MSAL_BROADCAST_CONFIG=l,e.MSAL_GUARD_CONFIG=c,e.MSAL_INSTANCE=s,e.MSAL_INTERCEPTOR_CONFIG=u,e.MsalBroadcastService=v,e.MsalCustomNavigationClient=C,e.MsalGuard=d,e.MsalInterceptor=f,e.MsalModule=m,e.MsalRedirectComponent=y,e.MsalService=h,e.version=g,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=azure-msal-angular.umd.min.js.map |
@@ -5,2 +5,3 @@ import { InjectionToken } from "@angular/core"; | ||
export declare const MSAL_INTERCEPTOR_CONFIG: InjectionToken<string>; | ||
export declare const MSAL_BROADCAST_CONFIG: InjectionToken<string>; | ||
//# sourceMappingURL=constants.d.ts.map |
@@ -9,2 +9,3 @@ /* | ||
export const MSAL_INTERCEPTOR_CONFIG = new InjectionToken("MSAL_INTERCEPTOR_CONFIG"); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJ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W5qZWN0aW9uVG9rZW48c3RyaW5nPihcIk1TQUxfSU5URVJDRVBUT1JfQ09ORklHXCIpO1xuXG5leHBvcnQgY29uc3QgTVNBTF9CUk9BRENBU1RfQ09ORklHID0gbmV3IEluamVjdGlvblRva2VuPHN0cmluZz4oXCJNU0FMX0JST0FEQ0FTVF9DT05GSUdcIik7XG4iXX0= |
@@ -5,12 +5,21 @@ /* | ||
*/ | ||
import { Inject, Injectable } from "@angular/core"; | ||
import { BehaviorSubject, Subject } from "rxjs"; | ||
import { MSAL_INSTANCE } from "./constants"; | ||
import { Inject, Injectable, Optional } from "@angular/core"; | ||
import { BehaviorSubject, ReplaySubject, Subject } from "rxjs"; | ||
import { MSAL_BROADCAST_CONFIG, MSAL_INSTANCE } from "./constants"; | ||
import { EventMessageUtils, InteractionStatus } from "@azure/msal-browser"; | ||
import { MsalService } from "./msal.service"; | ||
export class MsalBroadcastService { | ||
constructor(msalInstance, authService) { | ||
constructor(msalInstance, authService, msalBroadcastConfig) { | ||
this.msalInstance = msalInstance; | ||
this.authService = authService; | ||
this._msalSubject = new Subject(); | ||
this.msalBroadcastConfig = msalBroadcastConfig; | ||
// Make _msalSubject a ReplaySubject if configured to replay past events | ||
if (this.msalBroadcastConfig && this.msalBroadcastConfig.eventsToReplay > 0) { | ||
this.authService.getLogger().verbose(`BroadcastService - replayPastEvents set on BroadcastConfig, replaying the last ${this.msalBroadcastConfig.eventsToReplay} events`); | ||
this._msalSubject = new ReplaySubject(this.msalBroadcastConfig.eventsToReplay); | ||
} | ||
else { | ||
// Defaults to _msalSubject being a Subject | ||
this._msalSubject = new Subject(); | ||
} | ||
this.msalSubject$ = this._msalSubject.asObservable(); | ||
@@ -35,4 +44,5 @@ // InProgress as BehaviorSubject so most recent inProgress state will be available upon subscription | ||
{ type: undefined, decorators: [{ type: Inject, args: [MSAL_INSTANCE,] }] }, | ||
{ type: MsalService } | ||
{ type: MsalService }, | ||
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [M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bnRUeXBlfSByZXN1bHRzIGluIHNldHRpbmcgaW5Qcm9ncmVzcyBmcm9tICR7dGhpcy5faW5Qcm9ncmVzcy52YWx1ZX0gdG8gJHtzdGF0dXN9YCk7XG4gICAgICAgICAgICAgICAgdGhpcy5faW5Qcm9ncmVzcy5uZXh0KHN0YXR1cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cbn1cbiJdfQ== |
/* eslint-disable header/header */ | ||
export const name = "@azure/msal-angular"; | ||
export const version = "2.3.3"; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFja2FnZU1ldGFkYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3BhY2thZ2VNZXRhZGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxrQ0FBa0M7QUFDbEMsTUFBTSxDQUFDLE1BQU0sSUFBSSxHQUFHLHFCQUFxQixDQUFDO0FBQzFDLE1BQU0sQ0FBQyxNQUFNLE9BQU8sR0FBRyxPQUFPLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBoZWFkZXIvaGVhZGVyICovXG5leHBvcnQgY29uc3QgbmFtZSA9IFwiQGF6dXJlL21zYWwtYW5ndWxhclwiO1xuZXhwb3J0IGNvbnN0IHZlcnNpb24gPSBcIjIuMy4zXCI7XG4iXX0= | ||
export const version = "2.4.0"; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFja2FnZU1ldGFkYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3BhY2thZ2VNZXRhZGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxrQ0FBa0M7QUFDbEMsTUFBTSxDQUFDLE1BQU0sSUFBSSxHQUFHLHFCQUFxQixDQUFDO0FBQzFDLE1BQU0sQ0FBQyxNQUFNLE9BQU8sR0FBRyxPQUFPLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBoZWFkZXIvaGVhZGVyICovXG5leHBvcnQgY29uc3QgbmFtZSA9IFwiQGF6dXJlL21zYWwtYW5ndWxhclwiO1xuZXhwb3J0IGNvbnN0IHZlcnNpb24gPSBcIjIuNC4wXCI7XG4iXX0= |
@@ -12,3 +12,3 @@ /* | ||
export { MsalInterceptor } from "./msal.interceptor"; | ||
export { MSAL_INSTANCE, MSAL_GUARD_CONFIG, MSAL_INTERCEPTOR_CONFIG } from "./constants"; | ||
export { MSAL_INSTANCE, MSAL_GUARD_CONFIG, MSAL_INTERCEPTOR_CONFIG, MSAL_BROADCAST_CONFIG } from "./constants"; | ||
export { MsalBroadcastService } from "./msal.broadcast.service"; | ||
@@ -19,2 +19,2 @@ export { MsalModule } from "./msal.module"; | ||
export { version } from "./packageMetadata"; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7R0FHRztBQUVIOzs7R0FHRztBQUVILE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUU3QyxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sY0FBYyxDQUFDO0FBRXpDLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUVyRCxPQUFPLEVBQUUsYUFBYSxFQUFFLGlCQUFpQixFQUFFLHVCQUF1QixFQUFFLE1BQU0sYUFBYSxDQUFDO0FBQ3hGLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDBCQUEwQixDQ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Z1wiO1xuZXhwb3J0IHsgTVNBTF9JTlNUQU5DRSwgTVNBTF9HVUFSRF9DT05GSUcsIE1TQUxfSU5URVJDRVBUT1JfQ09ORklHLCBNU0FMX0JST0FEQ0FTVF9DT05GSUcgfSBmcm9tIFwiLi9jb25zdGFudHNcIjtcbmV4cG9ydCB7IE1zYWxCcm9hZGNhc3RTZXJ2aWNlIH0gZnJvbSBcIi4vbXNhbC5icm9hZGNhc3Quc2VydmljZVwiO1xuZXhwb3J0IHsgTXNhbEJyb2FkY2FzdENvbmZpZ3VyYXRpb24gfSBmcm9tIFwiLi9tc2FsLmJyb2FkY2FzdC5jb25maWdcIjtcbmV4cG9ydCB7IE1zYWxNb2R1bGUgfSBmcm9tIFwiLi9tc2FsLm1vZHVsZVwiO1xuZXhwb3J0IHsgTXNhbFJlZGlyZWN0Q29tcG9uZW50IH0gZnJvbSBcIi4vbXNhbC5yZWRpcmVjdC5jb21wb25lbnRcIjtcbmV4cG9ydCB7IE1zYWxDdXN0b21OYXZpZ2F0aW9uQ2xpZW50IH0gZnJvbSBcIi4vbXNhbC5uYXZpZ2F0aW9uLmNsaWVudFwiO1xuZXhwb3J0IHsgdmVyc2lvbiB9IGZyb20gXCIuL3BhY2thZ2VNZXRhZGF0YVwiO1xuIl19 |
@@ -1,5 +0,5 @@ | ||
import { InjectionToken, Injectable, Inject, VERSION, Component, NgModule } from '@angular/core'; | ||
import { InjectionToken, Injectable, Inject, Optional, VERSION, Component, NgModule } from '@angular/core'; | ||
import { Location, DOCUMENT, CommonModule } from '@angular/common'; | ||
import { WrapperSKU, InteractionStatus, EventMessageUtils, InteractionType, BrowserConfigurationAuthError, UrlString, BrowserUtils, StringUtils, NavigationClient } from '@azure/msal-browser'; | ||
import { from, Subject, BehaviorSubject, of, EMPTY } from 'rxjs'; | ||
import { from, ReplaySubject, Subject, BehaviorSubject, of, EMPTY } from 'rxjs'; | ||
import { Router } from '@angular/router'; | ||
@@ -16,6 +16,7 @@ import { map, concatMap, catchError, switchMap } from 'rxjs/operators'; | ||
const MSAL_INTERCEPTOR_CONFIG = new InjectionToken("MSAL_INTERCEPTOR_CONFIG"); | ||
const MSAL_BROADCAST_CONFIG = new InjectionToken("MSAL_BROADCAST_CONFIG"); | ||
/* eslint-disable header/header */ | ||
const name = "@azure/msal-angular"; | ||
const version = "2.3.3"; | ||
const version = "2.4.0"; | ||
@@ -98,6 +99,15 @@ /* | ||
class MsalBroadcastService { | ||
constructor(msalInstance, authService) { | ||
constructor(msalInstance, authService, msalBroadcastConfig) { | ||
this.msalInstance = msalInstance; | ||
this.authService = authService; | ||
this._msalSubject = new Subject(); | ||
this.msalBroadcastConfig = msalBroadcastConfig; | ||
// Make _msalSubject a ReplaySubject if configured to replay past events | ||
if (this.msalBroadcastConfig && this.msalBroadcastConfig.eventsToReplay > 0) { | ||
this.authService.getLogger().verbose(`BroadcastService - replayPastEvents set on BroadcastConfig, replaying the last ${this.msalBroadcastConfig.eventsToReplay} events`); | ||
this._msalSubject = new ReplaySubject(this.msalBroadcastConfig.eventsToReplay); | ||
} | ||
else { | ||
// Defaults to _msalSubject being a Subject | ||
this._msalSubject = new Subject(); | ||
} | ||
this.msalSubject$ = this._msalSubject.asObservable(); | ||
@@ -122,3 +132,4 @@ // InProgress as BehaviorSubject so most recent inProgress state will be available upon subscription | ||
{ type: undefined, decorators: [{ type: Inject, args: [MSAL_INSTANCE,] }] }, | ||
{ type: MsalService } | ||
{ type: MsalService }, | ||
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MSAL_BROADCAST_CONFIG,] }] } | ||
]; | ||
@@ -627,3 +638,3 @@ | ||
export { MSAL_GUARD_CONFIG, MSAL_INSTANCE, MSAL_INTERCEPTOR_CONFIG, MsalBroadcastService, MsalCustomNavigationClient, MsalGuard, MsalInterceptor, MsalModule, MsalRedirectComponent, MsalService, version }; | ||
export { MSAL_BROADCAST_CONFIG, MSAL_GUARD_CONFIG, MSAL_INSTANCE, MSAL_INTERCEPTOR_CONFIG, MsalBroadcastService, MsalCustomNavigationClient, MsalGuard, MsalInterceptor, MsalModule, MsalRedirectComponent, MsalService, version }; | ||
//# sourceMappingURL=azure-msal-angular.js.map |
import { Observable } from "rxjs"; | ||
import { EventMessage, IPublicClientApplication, InteractionStatus } from "@azure/msal-browser"; | ||
import { MsalService } from "./msal.service"; | ||
import { MsalBroadcastConfiguration } from "./msal.broadcast.config"; | ||
export declare class MsalBroadcastService { | ||
private msalInstance; | ||
private authService; | ||
private msalBroadcastConfig?; | ||
private _msalSubject; | ||
@@ -11,4 +13,4 @@ msalSubject$: Observable<EventMessage>; | ||
inProgress$: Observable<InteractionStatus>; | ||
constructor(msalInstance: IPublicClientApplication, authService: MsalService); | ||
constructor(msalInstance: IPublicClientApplication, authService: MsalService, msalBroadcastConfig?: MsalBroadcastConfiguration); | ||
} | ||
//# sourceMappingURL=msal.broadcast.service.d.ts.map |
{ | ||
"name": "@azure/msal-angular", | ||
"version": "2.3.3", | ||
"version": "2.4.0", | ||
"author": { | ||
@@ -23,3 +23,3 @@ "name": "Microsoft", | ||
"peerDependencies": { | ||
"@azure/msal-browser": "^2.27.0", | ||
"@azure/msal-browser": "^2.28.0", | ||
"rxjs": "^6.0.0 || ^7.0.0" | ||
@@ -26,0 +26,0 @@ }, |
export declare const name = "@azure/msal-angular"; | ||
export declare const version = "2.3.3"; | ||
export declare const version = "2.4.0"; | ||
//# sourceMappingURL=packageMetadata.d.ts.map |
@@ -11,4 +11,5 @@ /** | ||
export { MsalInterceptorConfiguration, MsalInterceptorAuthRequest, ProtectedResourceScopes } from "./msal.interceptor.config"; | ||
export { MSAL_INSTANCE, MSAL_GUARD_CONFIG, MSAL_INTERCEPTOR_CONFIG } from "./constants"; | ||
export { MSAL_INSTANCE, MSAL_GUARD_CONFIG, MSAL_INTERCEPTOR_CONFIG, MSAL_BROADCAST_CONFIG } from "./constants"; | ||
export { MsalBroadcastService } from "./msal.broadcast.service"; | ||
export { MsalBroadcastConfiguration } from "./msal.broadcast.config"; | ||
export { MsalModule } from "./msal.module"; | ||
@@ -15,0 +16,0 @@ export { MsalRedirectComponent } from "./msal.redirect.component"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
453987
55
2598