backbone.msal
Microsoft Authentication Library (MSAL) for Backbone
https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki
https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/FAQs
Install
$ npm install backbone.msal --save
Usage
Derive your router from Backbone.MsalRouter instead from Backbone.Router and add your azure ad config.
For information about the msal config see https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications
;;let mainRouting = BackboneMsalRouter
Calling protected endpoints
framework: {
protectedResourceMap : new Map( [
['https://your_api_url',['Scope(s) defined in the azure portal']]
])
}
Headers
Headers to inject in every xhr call
Headers: [
{ name: headername1, value: headervalue1 }
{ name: headername2, value: headervalue2 }
...
{ name: headernameN, value: headervalueN }
]