Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure/msal-angular

Package Overview
Dependencies
Maintainers
5
Versions
107
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 0.1.1 to 0.1.2

dist/AuthenticationResult.d.ts

5

changelog.md

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

# 0.1.2
* AOT fix for protectedResourceMap issue https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/407
* Broadcast message returns object
# 0.1.1

@@ -2,0 +7,0 @@ * Fixed AOT issue https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/386

2

dist/broadcast.service.metadata.json

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

[{"__symbolic":"module","version":3,"metadata":{"BroadcastService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"broadcast":[{"__symbolic":"method"}],"getMSALSubject":[{"__symbolic":"method"}],"getMSALItem":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"BroadcastService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"broadcast":[{"__symbolic":"method"}],"getMSALSubject":[{"__symbolic":"method"}],"getMSALItem":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":4,"metadata":{"MessageCallback":{"__symbolic":"interface"},"BroadcastService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"broadcast":[{"__symbolic":"method"}],"getMSALSubject":[{"__symbolic":"method"}],"getMSALItem":[{"__symbolic":"method"}],"subscribe":[{"__symbolic":"method"}]}}}}]

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

[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./msal-config","export":["MsalConfig"]},{"from":"./broadcast.service","export":["BroadcastService"]},{"from":"./msal.service","export":["MsalService"]},{"from":"./msal-guard.service","export":["MsalGuard"]},{"from":"./msal.interceptor","export":["MsalInterceptor"]},{"from":"./msal.module","export":["MsalModule"]}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./msal-config","export":["MsalConfig"]},{"from":"./broadcast.service","export":["BroadcastService"]},{"from":"./msal.service","export":["MsalService"]},{"from":"./msal-guard.service","export":["MsalGuard"]},{"from":"./msal.interceptor","export":["MsalInterceptor"]},{"from":"./msal.module","export":["MsalModule"]}]}]
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./msal-config","export":["MsalConfig"]},{"from":"./broadcast.service","export":["BroadcastService"]},{"from":"./msal.service","export":["MsalService"]},{"from":"./msal-guard.service","export":["MsalGuard"]},{"from":"./msal.interceptor","export":["MsalInterceptor"]},{"from":"./msal.module","export":["MsalModule"]}]}]

@@ -18,3 +18,3 @@ import { LogLevel } from "msal";

unprotectedResources?: string[];
protectedResourceMap?: Map<string, Array<string>>;
protectedResourceMap?: [string, string[]][];
extraQueryParameters?: string;

@@ -21,0 +21,0 @@ correlationId?: string;

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

[{"__symbolic":"module","version":3,"metadata":{"MsalConfig":{"__symbolic":"class"}}},{"__symbolic":"module","version":1,"metadata":{"MsalConfig":{"__symbolic":"class"}}}]
[{"__symbolic":"module","version":4,"metadata":{"MsalConfig":{"__symbolic":"class"}}}]

@@ -10,2 +10,4 @@ import { Inject, Injectable } from "@angular/core";

import { Constants } from "msal";
import { MSALError } from "./MSALError";
import { AuthenticationResult } from "./AuthenticationResult";
export class MsalGuard {

@@ -50,9 +52,16 @@ constructor(config, authService, router, activatedRoute, location, platformLocation, broadcastService) {

else if (!this.authService._oauthData.isAuthenticated && this.authService._oauthData.userName) {
this.authService.acquireTokenSilent([this.config.clientID]).then((token) => {
if (token) {
this.authService._oauthData.isAuthenticated = true;
this.broadcastService.broadcast("msal:loginSuccess", token);
}
}, (error) => {
this.broadcastService.broadcast("msal:loginFailure", { error });
return new Promise((resolve, reject) => {
this.authService.acquireTokenSilent([this.config.clientID]).then((token) => {
if (token) {
this.authService._oauthData.isAuthenticated = true;
var authenticationResult = new AuthenticationResult(token);
this.broadcastService.broadcast("msal:loginSuccess", authenticationResult);
resolve(true);
}
}, (error) => {
var errorParts = error.split('|');
var msalError = new MSALError(errorParts[0], errorParts[1], "");
this.broadcastService.broadcast("msal:loginFailure", msalError);
resolve(false);
});
});

@@ -59,0 +68,0 @@ }

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

[{"__symbolic":"module","version":3,"metadata":{"MsalGuard":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"./msal.service","name":"MSAL_CONFIG"}]}],null,null,null,null,null,null],"parameters":[{"__symbolic":"reference","module":"./msal-config","name":"MsalConfig"},{"__symbolic":"reference","module":"./msal.service","name":"MsalService"},{"__symbolic":"reference","module":"@angular/router","name":"Router"},{"__symbolic":"reference","module":"@angular/router","name":"ActivatedRoute"},{"__symbolic":"reference","module":"@angular/common","name":"Location"},{"__symbolic":"reference","module":"@angular/common","name":"PlatformLocation"},{"__symbolic":"reference","module":"./broadcast.service","name":"BroadcastService"}]}],"canActivate":[{"__symbolic":"method"}],"getBaseUrl":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"MsalGuard":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"./msal.service","name":"MSAL_CONFIG"}]}],null,null,null,null,null,null],"parameters":[{"__symbolic":"reference","module":"./msal-config","name":"MsalConfig"},{"__symbolic":"reference","module":"./msal.service","name":"MsalService"},{"__symbolic":"reference","module":"@angular/router","name":"Router"},{"__symbolic":"reference","module":"@angular/router","name":"ActivatedRoute"},{"__symbolic":"reference","module":"@angular/common","name":"Location"},{"__symbolic":"reference","module":"@angular/common","name":"PlatformLocation"},{"__symbolic":"reference","module":"./broadcast.service","name":"BroadcastService"}]}],"canActivate":[{"__symbolic":"method"}],"getBaseUrl":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":4,"metadata":{"MsalGuard":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"./msal.service","name":"MSAL_CONFIG"}]}],null,null,null,null,null,null],"parameters":[{"__symbolic":"reference","module":"./msal-config","name":"MsalConfig"},{"__symbolic":"reference","module":"./msal.service","name":"MsalService"},{"__symbolic":"reference","module":"@angular/router","name":"Router"},{"__symbolic":"reference","module":"@angular/router","name":"ActivatedRoute"},{"__symbolic":"reference","module":"@angular/common","name":"Location"},{"__symbolic":"reference","module":"@angular/common","name":"PlatformLocation"},{"__symbolic":"reference","module":"./broadcast.service","name":"BroadcastService"}]}],"canActivate":[{"__symbolic":"method"}],"getBaseUrl":[{"__symbolic":"method"}]}}}}]

@@ -8,2 +8,3 @@ import { Injectable } from '@angular/core';

import { BroadcastService } from "./broadcast.service";
import { MSALError } from "./MSALError";
export class MsalInterceptor {

@@ -34,3 +35,4 @@ constructor(auth, broadcastService) {

}
this.broadcastService.broadcast('msal:notAuthorized', { err, scopes });
var msalError = new MSALError(JSON.stringify(err), "", JSON.stringify(scopes));
this.broadcastService.broadcast('msal:notAuthorized', msalError);
}

@@ -54,3 +56,4 @@ });

}
this.broadcastService.broadcast('msal:notAuthorized', { err, scopes });
var msalError = new MSALError(JSON.stringify(err), "", JSON.stringify(scopes));
this.broadcastService.broadcast('msal:notAuthorized', msalError);
}

@@ -57,0 +60,0 @@ })); //calling next.handle means we are passing control to next interceptor in chain

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

[{"__symbolic":"module","version":3,"metadata":{"MsalInterceptor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./msal.service","name":"MsalService"},{"__symbolic":"reference","module":"./broadcast.service","name":"BroadcastService"}]}],"intercept":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"MsalInterceptor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./msal.service","name":"MsalService"},{"__symbolic":"reference","module":"./broadcast.service","name":"BroadcastService"}]}],"intercept":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":4,"metadata":{"MsalInterceptor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./msal.service","name":"MsalService"},{"__symbolic":"reference","module":"./broadcast.service","name":"BroadcastService"}]}],"intercept":[{"__symbolic":"method"}]}}}}]

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

[{"__symbolic":"module","version":3,"metadata":{"WindowWrapper":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"Window"}},"MsalModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[],"providers":[{"__symbolic":"reference","module":"./msal-guard.service","name":"MsalGuard"},{"__symbolic":"reference","module":"./broadcast.service","name":"BroadcastService"}]}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"MsalModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./msal.service","name":"MSAL_CONFIG"},"useValue":{"__symbolic":"reference","name":"config"}},{"__symbolic":"reference","module":"./msal.service","name":"MsalService"},{"provide":{"__symbolic":"reference","name":"WindowWrapper"},"useValue":{"__symbolic":"reference","name":"window"}}]}}}}}},{"__symbolic":"module","version":1,"metadata":{"WindowWrapper":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"Window"}},"MsalModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[],"providers":[{"__symbolic":"reference","module":"./msal-guard.service","name":"MsalGuard"},{"__symbolic":"reference","module":"./broadcast.service","name":"BroadcastService"}]}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"MsalModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./msal.service","name":"MSAL_CONFIG"},"useValue":{"__symbolic":"reference","name":"config"}},{"__symbolic":"reference","module":"./msal.service","name":"MsalService"},{"provide":{"__symbolic":"reference","name":"WindowWrapper"},"useValue":{"__symbolic":"reference","name":"window"}}]}}}}}}]
[{"__symbolic":"module","version":4,"metadata":{"WindowWrapper":{"__symbolic":"class","extends":{"__symbolic":"reference","name":"Window"}},"MsalModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[],"providers":[{"__symbolic":"reference","module":"./msal-guard.service","name":"MsalGuard"},{"__symbolic":"reference","module":"./broadcast.service","name":"BroadcastService"}]}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["config"],"value":{"ngModule":{"__symbolic":"reference","name":"MsalModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./msal.service","name":"MSAL_CONFIG"},"useValue":{"__symbolic":"reference","name":"config"}},{"__symbolic":"reference","module":"./msal.service","name":"MsalService"},{"provide":{"__symbolic":"reference","name":"WindowWrapper"},"useValue":{"__symbolic":"reference","name":"window"}}]}}}}}}]

@@ -21,3 +21,3 @@ import { InjectionToken } from "@angular/core";

};
loginScopes: string[];
private loginScopes;
_renewActive: boolean;

@@ -24,0 +24,0 @@ constructor(config: MsalConfig, router: Router, broadcastService: BroadcastService);

@@ -9,2 +9,4 @@ import { Inject, Injectable, InjectionToken } from "@angular/core";

import { BroadcastService } from "./broadcast.service";
import { AuthenticationResult } from "./AuthenticationResult";
import { MSALError } from "./MSALError";
export const MSAL_CONFIG = new InjectionToken("MSAL_CONFIG");

@@ -23,3 +25,3 @@ export class MsalService extends UserAgentApplication {

unprotectedResources: config.unprotectedResources,
protectedResourceMap: config.protectedResourceMap,
protectedResourceMap: new Map(config.protectedResourceMap),
});

@@ -40,8 +42,9 @@ this.config = config;

var errorParts = e.detail.split('|');
var msalError = new MSALError(errorParts[0], errorParts[1]);
if (this.loginInProgress()) {
broadcastService.broadcast('msal:loginFailure', { errorParts });
broadcastService.broadcast('msal:loginFailure', msalError);
this.setloginInProgress(false);
}
else if (this.getAcquireTokenInProgress()) {
broadcastService.broadcast('msal:acquireTokenFailure', { errorParts });
broadcastService.broadcast('msal:acquireTokenFailure', msalError);
this.setAcquireTokenInProgress(false);

@@ -110,5 +113,8 @@ }

var tokenType = null;
var msalError = new MSALError(error, errorDescription);
var authenticationResult = new AuthenticationResult(token);
if (requestInfo.stateMatch) {
if (requestInfo.requestType === "RENEW_TOKEN") {
tokenType = Constants.accessToken;
authenticationResult.tokenType = tokenType;
this._renewActive = false;

@@ -119,6 +125,6 @@ // Call within the same context without full page redirect keeps the callback

if (token) {
this.broadcastService.broadcast("msal:acquireTokenSuccess", token);
this.broadcastService.broadcast("msal:acquireTokenSuccess", authenticationResult);
}
else if (error && errorDescription) {
this.broadcastService.broadcast("msal:acquireTokenFailure", { errorDescription, error });
this.broadcastService.broadcast("msal:acquireTokenFailure", msalError);
}

@@ -129,2 +135,3 @@ }

tokenType = Constants.idToken;
authenticationResult.tokenType = tokenType;
this.updateDataFromCache(this.loginScopes);

@@ -138,6 +145,6 @@ if (this._oauthData.userName) {

}, 1);
this.broadcastService.broadcast("msal:loginSuccess", token);
this.broadcastService.broadcast("msal:loginSuccess", authenticationResult);
}
else {
this.broadcastService.broadcast("msal:loginFailure", { errorDescription, error });
this.broadcastService.broadcast("msal:loginFailure", msalError);
}

@@ -150,2 +157,3 @@ }

if (window.parent !== window) {
//in iframe
if (event && event.preventDefault) {

@@ -174,3 +182,3 @@ event.preventDefault();

// state did not match, broadcast an error
this.broadcastService.broadcast("msal:stateMismatch", { errorDescription, error });
this.broadcastService.broadcast("msal:stateMismatch", msalError);
}

@@ -194,10 +202,13 @@ }

this._cacheStorage.removeItem(Constants.urlHash);
var msalError = new MSALError(error, errorDesc);
var authenticationResult = new AuthenticationResult(token);
if (requestInfo.parameters[Constants.accessToken]) {
tokenType = Constants.accessToken;
if (token) {
this.broadcastService.broadcast("msal:acquireTokenSuccess", { token, tokenType });
authenticationResult.tokenType = tokenType;
this.broadcastService.broadcast("msal:acquireTokenSuccess", authenticationResult);
}
else if (error && errorDesc) {
//TODO this should also send back the scopes
this.broadcastService.broadcast("msal:acquireTokenFailure", { errorDesc, error });
this.broadcastService.broadcast("msal:acquireTokenFailure", msalError);
}

@@ -208,6 +219,7 @@ }

if (token) {
this.broadcastService.broadcast("msal:loginSuccess", { token, tokenType });
authenticationResult.tokenType = tokenType;
this.broadcastService.broadcast("msal:loginSuccess", authenticationResult);
}
else if (error && errorDesc) {
this.broadcastService.broadcast("msal:loginFailure", { errorDesc, error });
this.broadcastService.broadcast("msal:loginFailure", msalError);
}

@@ -253,7 +265,10 @@ }

super.loginPopup(consentScopes, extraQueryParameters).then((idToken) => {
this.broadcastService.broadcast("msal:loginSuccess", { idToken });
var authenticationResult = new AuthenticationResult(idToken, "idToken");
this.broadcastService.broadcast("msal:loginSuccess", authenticationResult);
resolve(idToken);
}, (error) => {
var errorParts = error.split('|');
var msalError = new MSALError(errorParts[0], errorParts[1]);
this._logger.error("Error during login:\n" + error);
this.broadcastService.broadcast("msal:loginFailure", { error });
this.broadcastService.broadcast("msal:loginFailure", msalError);
reject(error);

@@ -274,7 +289,10 @@ });

this._renewActive = false;
this.broadcastService.broadcast('msal:acquireTokenSuccess', token);
var authenticationResult = new AuthenticationResult(token);
this.broadcastService.broadcast('msal:acquireTokenSuccess', authenticationResult);
resolve(token);
}, (error) => {
var errorParts = error.split('|');
var msalError = new MSALError(errorParts[0], errorParts[1]);
this._renewActive = false;
this.broadcastService.broadcast('msal:acquireTokenFailure', error);
this.broadcastService.broadcast('msal:acquireTokenFailure', msalError);
this._logger.error('Error when acquiring token for scopes: ' + scopes + " " + error);

@@ -289,8 +307,11 @@ reject(error);

this._renewActive = false;
this.broadcastService.broadcast('msal:acquireTokenSuccess', token);
var authenticationResult = new AuthenticationResult(token);
this.broadcastService.broadcast('msal:acquireTokenSuccess', authenticationResult);
resolve(token);
}, (error) => {
var errorParts = error.split('|');
var msalError = new MSALError(errorParts[0], errorParts[1]);
this._renewActive = false;
this.broadcastService.broadcast('msal:acquireTokenFailure', error);
this._logger.error('Error when acquiring token for scopes : ' + scopes + error);
this.broadcastService.broadcast('msal:acquireTokenFailure', msalError);
this._logger.error('Error when acquiring token for scopes : ' + scopes + " " + error);
reject(error);

@@ -297,0 +318,0 @@ });

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

[{"__symbolic":"module","version":3,"metadata":{"MSAL_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["MSAL_CONFIG"]},"MsalService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"msal","name":"UserAgentApplication"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"MSAL_CONFIG"}]}],null,null],"parameters":[{"__symbolic":"reference","module":"./msal-config","name":"MsalConfig"},{"__symbolic":"reference","module":"@angular/router","name":"Router"},{"__symbolic":"reference","module":"./broadcast.service","name":"BroadcastService"}]}],"updateDataFromCache":[{"__symbolic":"method"}],"processHash":[{"__symbolic":"method"}],"processRedirectCallBack":[{"__symbolic":"method"}],"isUnprotectedResource":[{"__symbolic":"method"}],"isEmpty":[{"__symbolic":"method"}],"authCallback":[{"__symbolic":"method"}],"clearCache":[{"__symbolic":"method"}],"getLogger":[{"__symbolic":"method"}],"getCacheStorage":[{"__symbolic":"method"}],"isCallback":[{"__symbolic":"method"}],"loginRedirect":[{"__symbolic":"method"}],"loginPopup":[{"__symbolic":"method"}],"logout":[{"__symbolic":"method"}],"getCachedTokenInternal":[{"__symbolic":"method"}],"acquireTokenSilent":[{"__symbolic":"method"}],"acquireTokenPopup":[{"__symbolic":"method"}],"acquireTokenRedirect":[{"__symbolic":"method"}],"loginInProgress":[{"__symbolic":"method"}],"getUser":[{"__symbolic":"method"}],"getScopesForEndpoint":[{"__symbolic":"method"}],"clearCacheForScope":[{"__symbolic":"method"}],"info":[{"__symbolic":"method"}],"verbose":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"MSAL_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["MSAL_CONFIG"]},"MsalService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"msal","name":"UserAgentApplication"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"MSAL_CONFIG"}]}],null,null],"parameters":[{"__symbolic":"reference","module":"./msal-config","name":"MsalConfig"},{"__symbolic":"reference","module":"@angular/router","name":"Router"},{"__symbolic":"reference","module":"./broadcast.service","name":"BroadcastService"}]}],"updateDataFromCache":[{"__symbolic":"method"}],"processHash":[{"__symbolic":"method"}],"processRedirectCallBack":[{"__symbolic":"method"}],"isUnprotectedResource":[{"__symbolic":"method"}],"isEmpty":[{"__symbolic":"method"}],"authCallback":[{"__symbolic":"method"}],"clearCache":[{"__symbolic":"method"}],"getLogger":[{"__symbolic":"method"}],"getCacheStorage":[{"__symbolic":"method"}],"isCallback":[{"__symbolic":"method"}],"loginRedirect":[{"__symbolic":"method"}],"loginPopup":[{"__symbolic":"method"}],"logout":[{"__symbolic":"method"}],"getCachedTokenInternal":[{"__symbolic":"method"}],"acquireTokenSilent":[{"__symbolic":"method"}],"acquireTokenPopup":[{"__symbolic":"method"}],"acquireTokenRedirect":[{"__symbolic":"method"}],"loginInProgress":[{"__symbolic":"method"}],"getUser":[{"__symbolic":"method"}],"getScopesForEndpoint":[{"__symbolic":"method"}],"clearCacheForScope":[{"__symbolic":"method"}],"info":[{"__symbolic":"method"}],"verbose":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":4,"metadata":{"MSAL_CONFIG":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["MSAL_CONFIG"]},"MsalService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"msal","name":"UserAgentApplication"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"MSAL_CONFIG"}]}],null,null],"parameters":[{"__symbolic":"reference","module":"./msal-config","name":"MsalConfig"},{"__symbolic":"reference","module":"@angular/router","name":"Router"},{"__symbolic":"reference","module":"./broadcast.service","name":"BroadcastService"}]}],"updateDataFromCache":[{"__symbolic":"method"}],"processHash":[{"__symbolic":"method"}],"processRedirectCallBack":[{"__symbolic":"method"}],"isUnprotectedResource":[{"__symbolic":"method"}],"isEmpty":[{"__symbolic":"method"}],"authCallback":[{"__symbolic":"method"}],"clearCache":[{"__symbolic":"method"}],"getLogger":[{"__symbolic":"method"}],"getCacheStorage":[{"__symbolic":"method"}],"isCallback":[{"__symbolic":"method"}],"loginRedirect":[{"__symbolic":"method"}],"loginPopup":[{"__symbolic":"method"}],"logout":[{"__symbolic":"method"}],"getCachedTokenInternal":[{"__symbolic":"method"}],"acquireTokenSilent":[{"__symbolic":"method"}],"acquireTokenPopup":[{"__symbolic":"method"}],"acquireTokenRedirect":[{"__symbolic":"method"}],"loginInProgress":[{"__symbolic":"method"}],"getUser":[{"__symbolic":"method"}],"getScopesForEndpoint":[{"__symbolic":"method"}],"clearCacheForScope":[{"__symbolic":"method"}],"info":[{"__symbolic":"method"}],"verbose":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}]}}}}]

@@ -13,3 +13,3 @@ {

},
"version": "0.1.1",
"version": "0.1.2",
"keywords": [

@@ -16,0 +16,0 @@ "implicit",

@@ -5,3 +5,3 @@

The MSAL library preview for Angular is a wrapper of the core MSAL.js library which enables Angular(4.3 and above) applications to authenticate enterprise users using Microsoft Azure Active Directory (AAD), Microsoft account users (MSA), users using social identity providers like Facebook, Google, LinkedIn etc. and get access to [Microsoft Cloud](https://cloud.microsoft.com) OR [Microsoft Graph](https://graph.microsoft.io).
The MSAL library preview for Angular is a wrapper of the core MSAL.js library which enables Angular(4.3 to 5) applications to authenticate enterprise users using Microsoft Azure Active Directory (AAD), Microsoft account users (MSA), users using social identity providers like Facebook, Google, LinkedIn etc. and get access to [Microsoft Cloud](https://cloud.microsoft.com) OR [Microsoft Graph](https://graph.microsoft.io).

@@ -179,4 +179,6 @@

* **protectedResourceMap** : Mapping of resources to scopes {"https://graph.microsoft.com/v1.0/me", ["user.read", "mail.send"]}. Used internally by the MSAL for automatically attaching tokens in webApi calls.
This is required only for CORS calls.
* **protectedResourceMap** : Mapping of resources to scopes {"https://graph.microsoft.com/v1.0/me", ["user.read", "mail.send"]}. Used internally by the MSAL for automatically attaching tokens in webApi calls.
This is required only for CORS calls.
export const protectedResourceMap:[string, string[]][]=[ ['https://buildtodoservice.azurewebsites.net/api/todolist',['api://a88bb933-319c-41b5-9f04-eff36d985612/access_as_user']] , ['https://graph.microsoft.com/v1.0/me', ['user.read']] ];

@@ -234,7 +236,4 @@ * **level** : Configurable log level. Default value is Info.

```js
export const protectedResourceMap: Map<string, Array<string>> = new Map<string, Array<string>>();
export const protectedResourceMap:[string, string[]][]=[ ['https://buildtodoservice.azurewebsites.net/api/todolist',['api://a88bb933-319c-41b5-9f04-eff36d985612/access_as_user']] , ['https://graph.microsoft.com/v1.0/me', ['user.read']] ];
protectedResourceMap.set("https://graph.microsoft.com/v1.0/me", ["user.read"]);
protectedResourceMap.set("https://buildtodoservice.azurewebsites.net/api/todolist", ["api://a88bb933-319c-41b5-9f04-eff36d985612/access_as_user"]);
@NgModule({

@@ -241,0 +240,0 @@ imports: [ MsalModule.forRoot({

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 too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

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