Socket
Socket
Sign inDemoInstall

@azure/msal-angular

Package Overview
Dependencies
Maintainers
3
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/msal-angular - npm Package Compare versions

Comparing version 2.0.0-alpha.6 to 2.0.0-beta.0

2

azure-msal-angular.metadata.json

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":4,"metadata":{"MsalService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":23,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":29,"character":9},"arguments":[{"__symbolic":"reference","name":"MSAL_INSTANCE"}]}],null],"parameters":[{"__symbolic":"reference","module":"@azure/msal-browser","name":"IPublicClientApplication","line":29,"character":48},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":30,"character":26}]}],"acquireTokenPopup":[{"__symbolic":"method"}],"acquireTokenRedirect":[{"__symbolic":"method"}],"acquireTokenSilent":[{"__symbolic":"method"}],"handleRedirectObservable":[{"__symbolic":"method"}],"loginPopup":[{"__symbolic":"method"}],"loginRedirect":[{"__symbolic":"method"}],"logout":[{"__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":15,"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_GUARD_CONFIG"}]}],null,null,null],"parameters":[{"__symbolic":"reference","name":"MsalGuardConfiguration"},{"__symbolic":"reference","name":"MsalService"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":22,"character":26},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":23,"character":24}]}],"parseUrl":[{"__symbolic":"method"}],"getDestinationUrl":[{"__symbolic":"method"}],"loginInteractively":[{"__symbolic":"method"}],"activateHelper":[{"__symbolic":"method"}],"canActivate":[{"__symbolic":"method"}],"canActivateChild":[{"__symbolic":"method"}],"canLoad":[{"__symbolic":"method"}]}},"MsalGuardConfiguration":{"__symbolic":"interface"},"MsalInterceptor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":19,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":22,"character":9},"arguments":[{"__symbolic":"reference","name":"MSAL_INTERCEPTOR_CONFIG"}]}],null],"parameters":[{"__symbolic":"reference","name":"MsalInterceptorConfiguration"},{"__symbolic":"reference","name":"MsalService"}]}],"intercept":[{"__symbolic":"method"}],"acquireTokenInteractively":[{"__symbolic":"method"}],"getScopesForEndpoint":[{"__symbolic":"method"}]}},"MsalInterceptorConfiguration":{"__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":10,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":9},"arguments":[{"__symbolic":"reference","name":"MSAL_INSTANCE"}]}]],"parameters":[{"__symbolic":"reference","module":"@azure/msal-browser","name":"IPublicClientApplication","line":18,"character":53}]}]}},"MsalModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":15,"character":1},"arguments":[{"declarations":[],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":18,"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":14,"character":1},"arguments":[{"selector":"app-redirect","template":""}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"MsalService"}]}],"ngOnInit":[{"__symbolic":"method"}]}}},"origins":{"MsalService":"./msal.service","IMsalService":"./IMsalService","MsalGuard":"./msal.guard","MsalGuardConfiguration":"./msal.guard.config","MsalInterceptor":"./msal.interceptor","MsalInterceptorConfiguration":"./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"},"importAs":"@azure/msal-angular"}
{"__symbolic":"module","version":4,"metadata":{"MsalService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":23,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":29,"character":9},"arguments":[{"__symbolic":"reference","name":"MSAL_INSTANCE"}]}],null],"parameters":[{"__symbolic":"reference","module":"@azure/msal-browser","name":"IPublicClientApplication","line":29,"character":48},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":30,"character":26}]}],"acquireTokenPopup":[{"__symbolic":"method"}],"acquireTokenRedirect":[{"__symbolic":"method"}],"acquireTokenSilent":[{"__symbolic":"method"}],"handleRedirectObservable":[{"__symbolic":"method"}],"loginPopup":[{"__symbolic":"method"}],"loginRedirect":[{"__symbolic":"method"}],"logout":[{"__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":15,"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_GUARD_CONFIG"}]}],null,null,null],"parameters":[{"__symbolic":"reference","name":"MsalGuardConfiguration"},{"__symbolic":"reference","name":"MsalService"},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":22,"character":26},{"__symbolic":"reference","module":"@angular/router","name":"Router","line":23,"character":24}]}],"parseUrl":[{"__symbolic":"method"}],"getDestinationUrl":[{"__symbolic":"method"}],"loginInteractively":[{"__symbolic":"method"}],"activateHelper":[{"__symbolic":"method"}],"canActivate":[{"__symbolic":"method"}],"canActivateChild":[{"__symbolic":"method"}],"canLoad":[{"__symbolic":"method"}]}},"MsalGuardConfiguration":{"__symbolic":"interface"},"MsalInterceptor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":19,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":22,"character":9},"arguments":[{"__symbolic":"reference","name":"MSAL_INTERCEPTOR_CONFIG"}]}],null],"parameters":[{"__symbolic":"reference","name":"MsalInterceptorConfiguration"},{"__symbolic":"reference","name":"MsalService"}]}],"intercept":[{"__symbolic":"method"}],"acquireTokenInteractively":[{"__symbolic":"method"}],"getScopesForEndpoint":[{"__symbolic":"method"}]}},"MsalInterceptorConfiguration":{"__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":15,"character":1},"arguments":[{"declarations":[],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":18,"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":14,"character":1},"arguments":[{"selector":"app-redirect","template":""}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"MsalService"}]}],"ngOnInit":[{"__symbolic":"method"}]}}},"origins":{"MsalService":"./msal.service","IMsalService":"./IMsalService","MsalGuard":"./msal.guard","MsalGuardConfiguration":"./msal.guard.config","MsalInterceptor":"./msal.interceptor","MsalInterceptorConfiguration":"./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"},"importAs":"@azure/msal-angular"}

@@ -17,3 +17,3 @@ (function (global, factory) {

var name = "@azure/msal-angular";
var version = "2.0.0-alpha.6";
var version = "2.0.0-beta.0";

@@ -324,5 +324,6 @@ /*

var MsalBroadcastService = /** @class */ (function () {
function MsalBroadcastService(msalInstance) {
function MsalBroadcastService(msalInstance, authService) {
var _this = this;
this.msalInstance = msalInstance;
this.authService = authService;
this._msalSubject = new rxjs.Subject();

@@ -336,3 +337,3 @@ this.msalSubject$ = this._msalSubject.asObservable();

if (status !== null) {
_this.msalInstance.getLogger().verbose("BroadcastService - " + message.eventType + " results in setting inProgress to " + status);
_this.authService.getLogger().verbose("BroadcastService - " + message.eventType + " results in setting inProgress to " + status);
_this._inProgress.next(status);

@@ -348,3 +349,4 @@ }

MsalBroadcastService.ctorParameters = function () { return [
{ type: undefined, decorators: [{ type: core.Inject, args: [MSAL_INSTANCE,] }] }
{ type: undefined, decorators: [{ type: core.Inject, args: [MSAL_INSTANCE,] }] },
{ type: MsalService }
]; };

@@ -351,0 +353,0 @@

@@ -1,2 +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=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,n,o,i,a){"use strict";var c=new t.InjectionToken("MSAL_INSTANCE"),s=new t.InjectionToken("MSAL_GUARD_CONFIG"),u=new t.InjectionToken("MSAL_INTERCEPTOR_CONFIG"),g="@azure/msal-angular",p="2.0.0-alpha.6",l=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(n.WrapperSKU.Angular,p)}return e.prototype.acquireTokenPopup=function(e){return o.from(this.instance.acquireTokenPopup(e))},e.prototype.acquireTokenRedirect=function(e){return o.from(this.instance.acquireTokenRedirect(e))},e.prototype.acquireTokenSilent=function(e){return o.from(this.instance.acquireTokenSilent(e))},e.prototype.handleRedirectObservable=function(){var e=o.from(this.instance.handleRedirectPromise(this.redirectHash));return this.redirectHash="",e},e.prototype.loginPopup=function(e){return o.from(this.instance.loginPopup(e))},e.prototype.loginRedirect=function(e){return o.from(this.instance.loginRedirect(e))},e.prototype.logout=function(e){return o.from(this.instance.logout(e))},e.prototype.ssoSilent=function(e){return o.from(this.instance.ssoSilent(e))},e.prototype.getLogger=function(){return this.logger||(this.logger=this.instance.getLogger().clone(g,p)),this.logger},e.prototype.setLogger=function(e){this.logger=e.clone(g,p),this.instance.setLogger(e)},e}();l.decorators=[{type:t.Injectable}],l.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[c]}]},{type:r.Location}]};var h=function(){function e(e,t,r,n){this.msalGuardConfig=e,this.authService=t,this.location=r,this.router=n}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),n=this.location.prepareExternalUrl(e);return n.startsWith("#")?(this.authService.getLogger().verbose("Guard - destination by hash routing"),r+"/"+n):""+r+e},e.prototype.loginInteractively=function(e){var t=this;if(this.msalGuardConfig.interactionType===n.InteractionType.Popup)return this.authService.getLogger().verbose("Guard - logging in by popup"),this.authService.loginPopup(Object.assign({},this.msalGuardConfig.authRequest)).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 r=this.getDestinationUrl(e);return this.authService.loginRedirect(Object.assign({redirectStartPage:r},this.msalGuardConfig.authRequest)).pipe(a.map((function(){return!1})))},e.prototype.activateHelper=function(e){var r=this;if(this.msalGuardConfig.interactionType!==n.InteractionType.Popup&&this.msalGuardConfig.interactionType!==n.InteractionType.Redirect)throw new n.BrowserConfigurationAuthError("invalid_interaction_type","Invalid interaction type provided to MSAL Guard. InteractionType.Popup or InteractionType.Redirect must be provided in the MsalGuardConfiguration");return this.authService.getLogger().verbose("MSAL Guard activated"),n.UrlString.hashContainsKnownProperties(window.location.hash)&&n.BrowserUtils.isInIframe()?(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."),o.of(!1)):(this.msalGuardConfig.loginFailedRoute&&(this.loginFailedRoute=this.parseUrl(this.msalGuardConfig.loginFailedRoute)),this.authService.handleRedirectObservable().pipe(a.concatMap((function(){return r.authService.instance.getAllAccounts().length?(r.authService.getLogger().verbose("Guard - account retrieved, can activate or load"),o.of(!0)):e?(r.authService.getLogger().verbose("Guard - no accounts retrieved, log in required to activate"),r.loginInteractively(e.url)):(r.authService.getLogger().verbose("Guard - no accounts retrieved, no state, cannot load"),o.of(!1))})),a.catchError((function(){return r.authService.getLogger().verbose("Guard - error while logging in, unable to activate"),r.loginFailedRoute&&parseInt(t.VERSION.major,10)>9&&e?(r.authService.getLogger().verbose("Guard - loginFailedRoute set, redirecting"),o.of(r.loginFailedRoute)):o.of(!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}();h.decorators=[{type:t.Injectable}],h.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[s]}]},{type:l},{type:r.Location},{type:i.Router}]};var d=function(){function e(e,t){this.msalInterceptorConfig=e,this.authService=t}return e.prototype.intercept=function(e,t){var r=this;if(this.msalInterceptorConfig.interactionType!==n.InteractionType.Popup&&this.msalInterceptorConfig.interactionType!==n.InteractionType.Redirect)throw new n.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,c=this.getScopesForEndpoint(e.url);return 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]),c&&0!==c.length?(this.authService.getLogger().info("Interceptor - "+c.length+" scopes found for endpoint"),this.authService.getLogger().infoPii("Interceptor - ["+c+"] scopes found for "+e.url),this.authService.acquireTokenSilent(Object.assign(Object.assign({},this.msalInterceptorConfig.authRequest),{scopes:c,account:i})).pipe(a.catchError((function(){return r.authService.getLogger().error("Interceptor - acquireTokenSilent rejected with error. Invoking interaction to resolve."),r.acquireTokenInteractively(c)})),a.switchMap((function(e){return e.accessToken?o.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))})),a.switchMap((function(n){r.authService.getLogger().verbose("Interceptor - setting authorization headers");var o=e.headers.set("Authorization","Bearer "+n.accessToken),i=e.clone({headers:o});return t.handle(i)})))):(this.authService.getLogger().verbose("Interceptor - no scopes for endpoint"),t.handle(e))},e.prototype.acquireTokenInteractively=function(e){if(this.msalInterceptorConfig.interactionType===n.InteractionType.Popup)return this.authService.getLogger().verbose("Interceptor - error acquiring token silently, acquiring by popup"),this.authService.acquireTokenPopup(Object.assign(Object.assign({},this.msalInterceptorConfig.authRequest),{scopes:e}));this.authService.getLogger().verbose("Interceptor - error acquiring token silently, acquiring by redirect");var t=window.location.href;return this.authService.acquireTokenRedirect(Object.assign(Object.assign({},this.msalInterceptorConfig.authRequest),{scopes:e,redirectStartPage:t})),o.EMPTY},e.prototype.getScopesForEndpoint=function(e){this.authService.getLogger().verbose("Interceptor - getting scopes for endpoint");var t=Array.from(this.msalInterceptorConfig.protectedResourceMap.keys()).filter((function(t){return n.StringUtils.matchPattern(t,e)}));if(t.length>0){var r=t[0];if(r)return this.msalInterceptorConfig.protectedResourceMap.get(r)}return null},e}();d.decorators=[{type:t.Injectable}],d.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[u]}]},{type:l}]};var v=function(e){var t=this;this.msalInstance=e,this._msalSubject=new o.Subject,this.msalSubject$=this._msalSubject.asObservable(),this._inProgress=new o.Subject,this.inProgress$=this._inProgress.asObservable(),this.msalInstance.addEventCallback((function(e){t._msalSubject.next(e);var r=n.EventMessageUtils.getInteractionStatusFromEvent(e);null!==r&&(t.msalInstance.getLogger().verbose("BroadcastService - "+e.eventType+" results in setting inProgress to "+r),t._inProgress.next(r))}))};v.decorators=[{type:t.Injectable}],v.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[c]}]}]};var f=function(){function e(){}return e.forRoot=function(t,r,n){return{ngModule:e,providers:[{provide:c,useValue:t},{provide:s,useValue:r},{provide:u,useValue:n},l]}},e}();f.decorators=[{type:t.NgModule,args:[{declarations:[],imports:[r.CommonModule],providers:[h,v]}]}];var y=function(){function e(e){this.authService=e}return e.prototype.ngOnInit=function(){this.authService.handleRedirectObservable().subscribe()},e}();y.decorators=[{type:t.Component,args:[{selector:"app-redirect",template:""}]}],y.ctorParameters=function(){return[{type:l}]},e.MSAL_GUARD_CONFIG=s,e.MSAL_INSTANCE=c,e.MSAL_INTERCEPTOR_CONFIG=u,e.MsalBroadcastService=v,e.MsalGuard=h,e.MsalInterceptor=d,e.MsalModule=f,e.MsalRedirectComponent=y,e.MsalService=l,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=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 c=new t.InjectionToken("MSAL_INSTANCE"),s=new t.InjectionToken("MSAL_GUARD_CONFIG"),u=new t.InjectionToken("MSAL_INTERCEPTOR_CONFIG"),g="@azure/msal-angular",p="2.0.0-beta.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,p)}return 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(){var e=n.from(this.instance.handleRedirectPromise(this.redirectHash));return this.redirectHash="",e},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.ssoSilent=function(e){return n.from(this.instance.ssoSilent(e))},e.prototype.getLogger=function(){return this.logger||(this.logger=this.instance.getLogger().clone(g,p)),this.logger},e.prototype.setLogger=function(e){this.logger=e.clone(g,p),this.instance.setLogger(e)},e}();h.decorators=[{type:t.Injectable}],h.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[c]}]},{type:r.Location}]};var l=function(){function e(e,t,r,o){this.msalGuardConfig=e,this.authService=t,this.location=r,this.router=o}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;if(this.msalGuardConfig.interactionType===o.InteractionType.Popup)return this.authService.getLogger().verbose("Guard - logging in by popup"),this.authService.loginPopup(Object.assign({},this.msalGuardConfig.authRequest)).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 r=this.getDestinationUrl(e);return this.authService.loginRedirect(Object.assign({redirectStartPage:r},this.msalGuardConfig.authRequest)).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");return this.authService.getLogger().verbose("MSAL Guard activated"),o.UrlString.hashContainsKnownProperties(window.location.hash)&&o.BrowserUtils.isInIframe()?(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)),this.authService.handleRedirectObservable().pipe(a.concatMap((function(){return r.authService.instance.getAllAccounts().length?(r.authService.getLogger().verbose("Guard - account retrieved, can activate or load"),n.of(!0)):e?(r.authService.getLogger().verbose("Guard - no accounts retrieved, log in required to activate"),r.loginInteractively(e.url)):(r.authService.getLogger().verbose("Guard - no accounts retrieved, no state, cannot load"),n.of(!1))})),a.catchError((function(){return r.authService.getLogger().verbose("Guard - error while logging in, unable to activate"),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.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}();l.decorators=[{type:t.Injectable}],l.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[s]}]},{type:h},{type:r.Location},{type:i.Router}]};var v=function(){function e(e,t){this.msalInterceptorConfig=e,this.authService=t}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,c=this.getScopesForEndpoint(e.url);return 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]),c&&0!==c.length?(this.authService.getLogger().info("Interceptor - "+c.length+" scopes found for endpoint"),this.authService.getLogger().infoPii("Interceptor - ["+c+"] scopes found for "+e.url),this.authService.acquireTokenSilent(Object.assign(Object.assign({},this.msalInterceptorConfig.authRequest),{scopes:c,account:i})).pipe(a.catchError((function(){return r.authService.getLogger().error("Interceptor - acquireTokenSilent rejected with error. Invoking interaction to resolve."),r.acquireTokenInteractively(c)})),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))})),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)})))):(this.authService.getLogger().verbose("Interceptor - no scopes for endpoint"),t.handle(e))},e.prototype.acquireTokenInteractively=function(e){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({},this.msalInterceptorConfig.authRequest),{scopes:e}));this.authService.getLogger().verbose("Interceptor - error acquiring token silently, acquiring by redirect");var t=window.location.href;return this.authService.acquireTokenRedirect(Object.assign(Object.assign({},this.msalInterceptorConfig.authRequest),{scopes:e,redirectStartPage:t})),n.EMPTY},e.prototype.getScopesForEndpoint=function(e){this.authService.getLogger().verbose("Interceptor - getting scopes for endpoint");var t=Array.from(this.msalInterceptorConfig.protectedResourceMap.keys()).filter((function(t){return o.StringUtils.matchPattern(t,e)}));if(t.length>0){var r=t[0];if(r)return this.msalInterceptorConfig.protectedResourceMap.get(r)}return null},e}();v.decorators=[{type:t.Injectable}],v.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[u]}]},{type:h}]};var d=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.Subject,this.inProgress$=this._inProgress.asObservable(),this.msalInstance.addEventCallback((function(e){r._msalSubject.next(e);var t=o.EventMessageUtils.getInteractionStatusFromEvent(e);null!==t&&(r.authService.getLogger().verbose("BroadcastService - "+e.eventType+" results in setting inProgress to "+t),r._inProgress.next(t))}))};d.decorators=[{type:t.Injectable}],d.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[c]}]},{type:h}]};var f=function(){function e(){}return e.forRoot=function(t,r,o){return{ngModule:e,providers:[{provide:c,useValue:t},{provide:s,useValue:r},{provide:u,useValue:o},h]}},e}();f.decorators=[{type:t.NgModule,args:[{declarations:[],imports:[r.CommonModule],providers:[l,d]}]}];var y=function(){function e(e){this.authService=e}return e.prototype.ngOnInit=function(){this.authService.handleRedirectObservable().subscribe()},e}();y.decorators=[{type:t.Component,args:[{selector:"app-redirect",template:""}]}],y.ctorParameters=function(){return[{type:h}]},e.MSAL_GUARD_CONFIG=s,e.MSAL_INSTANCE=c,e.MSAL_INTERCEPTOR_CONFIG=u,e.MsalBroadcastService=d,e.MsalGuard=l,e.MsalInterceptor=v,e.MsalModule=f,e.MsalRedirectComponent=y,e.MsalService=h,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=azure-msal-angular.umd.min.js.map
# Change Log - @azure/msal-angular
This log was last generated on Thu, 18 Feb 2021 00:34:32 GMT and should not be manually modified.
This log was last generated on Wed, 03 Mar 2021 21:47:05 GMT and should not be manually modified.
<!-- Start content -->
## 2.0.0-beta.0
Wed, 03 Mar 2021 21:47:05 GMT
### Changes
- Fix BroadcastService logging to use msal-angular version, update samples versions, profile, and links (#3015) (joarroyo@microsoft.com)
- Add FAQ.md and active accounts in sample (#2977) (joarroyo@microsoft.com)
- Update msal-angular preinstall script to force npm-force-resolutions version (#3074) (joarroyo@microsoft.com)
## 2.0.0-alpha.6

@@ -8,0 +18,0 @@

@@ -9,5 +9,7 @@ /*

import { EventMessageUtils } from "@azure/msal-browser";
import { MsalService } from "./msal.service";
export class MsalBroadcastService {
constructor(msalInstance) {
constructor(msalInstance, authService) {
this.msalInstance = msalInstance;
this.authService = authService;
this._msalSubject = new Subject();

@@ -21,3 +23,3 @@ this.msalSubject$ = this._msalSubject.asObservable();

if (status !== null) {
this.msalInstance.getLogger().verbose(`BroadcastService - ${message.eventType} results in setting inProgress to ${status}`);
this.authService.getLogger().verbose(`BroadcastService - ${message.eventType} results in setting inProgress to ${status}`);
this._inProgress.next(status);

@@ -32,4 +34,5 @@ }

MsalBroadcastService.ctorParameters = () => [
{ type: undefined, decorators: [{ type: Inject, args: [MSAL_INSTANCE,] }] }
{ type: undefined, decorators: [{ type: Inject, args: [MSAL_INSTANCE,] }] },
{ type: MsalService }
];
//# s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gICAgKSB7XHJcbiAgICAgICAgdGhpcy5fbXNhbFN1YmplY3QgPSBuZXcgU3ViamVjdDxFdmVudE1lc3NhZ2U+KCk7XHJcbiAgICAgICAgdGhpcy5tc2FsU3ViamVjdCQgID0gdGhpcy5fbXNhbFN1YmplY3QuYXNPYnNlcnZhYmxlKCk7XHJcbiAgICAgICAgdGhpcy5faW5Qcm9ncmVzcyA9IG5ldyBTdWJqZWN0PEludGVyYWN0aW9uU3RhdHVzPigpO1xyXG4gICAgICAgIHRoaXMuaW5Qcm9ncmVzcyQgPSB0aGlzLl9pblByb2dyZXNzLmFzT2JzZXJ2YWJsZSgpO1xyXG4gICAgICAgIHRoaXMubXNhbEluc3RhbmNlLmFkZEV2ZW50Q2FsbGJhY2soKG1lc3NhZ2U6IEV2ZW50TWVzc2FnZSkgPT4ge1xyXG4gICAgICAgICAgICB0aGlzLl9tc2FsU3ViamVjdC5uZXh0KG1lc3NhZ2UpO1xyXG4gICAgICAgICAgICBjb25zdCBzdGF0dXMgPSBFdmVudE1lc3NhZ2VVdGlscy5nZXRJbnRlcmFjdGlvblN0YXR1c0Zyb21FdmVudChtZXNzYWdlKTtcclxuICAgICAgICAgICAgaWYgKHN0YXR1cyAhPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5hdXRoU2VydmljZS5nZXRMb2dnZXIoKS52ZXJib3NlKGBCcm9hZGNhc3RTZXJ2aWNlIC0gJHttZXNzYWdlLmV2ZW50VHlwZX0gcmVzdWx0cyBpbiBzZXR0aW5nIGluUHJvZ3Jlc3MgdG8gJHtzdGF0dXN9YCk7XHJcbiAgICAgICAgICAgICAgICB0aGlzLl9pblByb2dyZXNzLm5leHQoc3RhdHVzKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG59XHJcbiJdfQ==
/* eslint-disable header/header */
export const name = "@azure/msal-angular";
export const version = "2.0.0-alpha.6";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJz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ci9oZWFkZXIgKi9cbmV4cG9ydCBjb25zdCBuYW1lID0gXCJAYXp1cmUvbXNhbC1hbmd1bGFyXCI7XG5leHBvcnQgY29uc3QgdmVyc2lvbiA9IFwiMi4wLjAtYmV0YS4wXCI7XG4iXX0=

@@ -18,3 +18,3 @@ import { InjectionToken, Injectable, Inject, VERSION, NgModule, Component } from '@angular/core';

const name = "@azure/msal-angular";
const version = "2.0.0-alpha.6";
const version = "2.0.0-beta.0";

@@ -319,4 +319,5 @@ /*

class MsalBroadcastService {
constructor(msalInstance) {
constructor(msalInstance, authService) {
this.msalInstance = msalInstance;
this.authService = authService;
this._msalSubject = new Subject();

@@ -330,3 +331,3 @@ this.msalSubject$ = this._msalSubject.asObservable();

if (status !== null) {
this.msalInstance.getLogger().verbose(`BroadcastService - ${message.eventType} results in setting inProgress to ${status}`);
this.authService.getLogger().verbose(`BroadcastService - ${message.eventType} results in setting inProgress to ${status}`);
this._inProgress.next(status);

@@ -341,3 +342,4 @@ }

MsalBroadcastService.ctorParameters = () => [
{ type: undefined, decorators: [{ type: Inject, args: [MSAL_INSTANCE,] }] }
{ type: undefined, decorators: [{ type: Inject, args: [MSAL_INSTANCE,] }] },
{ type: MsalService }
];

@@ -344,0 +346,0 @@

import { Observable } from "rxjs";
import { EventMessage, IPublicClientApplication, InteractionStatus } from "@azure/msal-browser";
import { MsalService } from "./msal.service";
export declare class MsalBroadcastService {
private msalInstance;
private authService;
private _msalSubject;

@@ -9,3 +11,3 @@ msalSubject$: Observable<EventMessage>;

inProgress$: Observable<InteractionStatus>;
constructor(msalInstance: IPublicClientApplication);
constructor(msalInstance: IPublicClientApplication, authService: MsalService);
}
{
"name": "@azure/msal-angular",
"version": "2.0.0-alpha.6",
"version": "2.0.0-beta.0",
"main": "bundles/azure-msal-angular.umd.js",

@@ -9,3 +9,3 @@ "typings": "azure-msal-angular.d.ts",

"@angular/core": "9 - 11",
"@azure/msal-browser": "^2.11.2",
"@azure/msal-browser": "^2.12.0",
"rxjs": "^6.0.0"

@@ -12,0 +12,0 @@ },

export declare const name = "@azure/msal-angular";
export declare const version = "2.0.0-alpha.6";
export declare const version = "2.0.0-beta.0";

@@ -12,15 +12,16 @@ # Microsoft Authentication Library for Angular

1. [About](#about)
2. [Guides](#guides)
3. [Version Support](#version-support)
4. [Prerequisites](#prerequisites)
5. [Installation](#installation)
6. [Usage](#usage)
7. [Samples](#samples)
8. [Build and running tests](#build-and-running-tests)
9. [Versioning](#versioning)
10. [Community Help and Support](#community-help-and-support)
11. [Contribute](#contribute)
12. [Security Reporting](#security-reporting)
13. [License](#license)
14. [Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)
1. [Guides](#guides)
1. [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/FAQ.md)
1. [Version Support](#version-support)
1. [Prerequisites](#prerequisites)
1. [Installation](#installation)
1. [Usage](#usage)
1. [Samples](#samples)
1. [Build and running tests](#build-and-running-tests)
1. [Versioning](#versioning)
1. [Community Help and Support](#community-help-and-support)
1. [Contribute](#contribute)
1. [Security Reporting](#security-reporting)
1. [License](#license)
1. [Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)

@@ -78,2 +79,3 @@ ## About

1. [Angular Universal and SSR](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/v2-docs/angular-universal.md)
1. [Performance](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/v2-docs/performance.md)

@@ -98,2 +100,10 @@ All documentation for MSAL Angular v1 can be found [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular/docs/v1-docs/).

See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/samples/msal-angular-v2-samples/README.md) for specific features demonstrated by our 2.x samples.
### Advanced MSAL Angular 2.x Samples
* [Angular SPA with ASP.NET Core web API](https://github.com/Azure-Samples/ms-identity-javascript-angular-spa-aspnetcore-webapi)
* [Angular SPA with APS.NET Core web API using App Roles and RBAC](https://github.com/Azure-Samples/ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups)
* [Multi-tenant tutorial using MSAL Angular v2](https://github.com/Azure-Samples/ms-identity-javascript-angular-spa-aspnet-webapi-multitenant)
## Build and running tests

@@ -100,0 +110,0 @@

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc