-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauthConfig.js
39 lines (38 loc) · 1003 Bytes
/
authConfig.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const passportConfig = {
credentials: {
tenantID: 'Enter_the_Tenant_Info_Here',
clientID: 'Enter_the_Application_Id_Here',
},
metadata: {
authority: 'login.microsoftonline.com',
discovery: '.well-known/openid-configuration',
version: 'v2.0',
},
settings: {
validateIssuer: true,
passReqToCallback: true,
loggingLevel: 'info',
loggingNoPII: false,
},
protectedRoutes: {
todolist: {
endpoint: '/api',
delegatedPermissions: {
scopes: ['access_via_approle_assignments'],
},
},
},
accessMatrix: {
todolist: {
path: '/todolist',
methods: ['GET', 'POST', 'PUT', 'DELETE'],
roles: ['TaskUser', 'TaskAdmin'],
},
dashboard: {
path: '/dashboard',
methods: ['GET'],
roles: ['TaskAdmin'],
},
},
};
module.exports = passportConfig;