1.0.5 • Published 4 years ago
backbone.msal v1.0.5
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
import Backbone from "backbone";
import "backone.msal";
let mainRouting = Backbone.MsalRouter.extend({
msalConfig: {
auth: {
clientId: 'your_client_id'
},
cache: {
},
system: {
},
framework: {
}
},
//extra before routing
before: function (params, next) { return next(); },
//extra after routing
after: function () { },
Headers: [
{ name: headername1, value: headervalue1 }
{ name: headername2, value: headervalue2 }
...
{ name: headernameN, value: headervalueN }
]
//continue normal setup for a router
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 }
]
1.0.5
4 years ago
1.0.5-beta.0
4 years ago
1.0.4
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
0.0.21
4 years ago
0.0.19
5 years ago
0.0.18
5 years ago
0.0.17
5 years ago
0.0.16
5 years ago
0.0.15
5 years ago
0.0.13
5 years ago
0.0.12
5 years ago
0.0.11
5 years ago
0.0.10
5 years ago
0.0.9
5 years ago
0.0.8
5 years ago
0.0.7
5 years ago
0.0.6
5 years ago
0.0.5
5 years ago
0.0.4
5 years ago