Skip to content

Commit b66ddb8

Browse files
committed
Small refactorings and upgraded packages referenced
1 parent 9ca11e2 commit b66ddb8

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

LICENSE

100644100755
File mode changed.

azure_ad.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,19 @@ if (Meteor.isClient) {
1212
AzureAd.requestCredential(options, credentialRequestCompleteCallback);
1313
};
1414
} else {
15-
Accounts.addAutopublishFields({
16-
forLoggedInUser: _.map(
17-
AzureAd.whitelistedFields.concat(['accessToken', 'expiresAt']), // don't publish refresh token
18-
function (subfield) { return 'services.azureAd.' + subfield; }),
15+
var fieldsForLoggedInusers = _.map(
16+
AzureAd.whitelistedFields.concat(['accessToken', 'expiresAt']), // don't publish refresh token
17+
function (subfield) { return 'services.azureAd.' + subfield; }
18+
);
19+
var fieldsForOtherUsers = _.map(
20+
// even with autopublish, no legitimate web app should be
21+
// publishing all users' emails
22+
_.without(AzureAd.whitelistedFields, 'mail', 'userPrincipleName'),
23+
function (subfield) { return 'services.azureAd.' + subfield; }
24+
);
1925

20-
forOtherUsers: _.map(
21-
// even with autopublish, no legitimate web app should be
22-
// publishing all users' emails
23-
_.without(AzureAd.whitelistedFields, 'mail', 'userPrincipleName'),
24-
function (subfield) { return 'services.azureAd.' + subfield; })
26+
Accounts.addAutopublishFields({
27+
forLoggedInUser: fieldsForLoggedInusers,
28+
forOtherUsers: fieldsForOtherUsers
2529
});
2630
}

package.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
Package.describe({
22
summary: "Login service for Azure Active Directory",
3-
version: "0.1.7",
3+
version: "0.1.9",
44
name: "wiseguyeh:accounts-azure-active-directory",
55
git: "https://github.com/djluck/accounts-azure-active-directory"
66
});
77

88
Package.onUse(function(api) {
99
10-
api.use('[email protected].2', ['client', 'server']);
11-
// Export Accounts (etc) to packages using this one.
10+
api.use('[email protected].3', ['client', 'server']);
11+
// Export Accounts (etc) to packages using this one.
1212
api.imply('accounts-base', ['client', 'server']);
13-
api.use('[email protected].2', ['client', 'server']);
13+
api.use('[email protected].3', ['client', 'server']);
1414
api.use('wiseguyeh:[email protected]', ['client', 'server']);
1515

1616
api.addFiles("azure_ad.js");

0 commit comments

Comments
 (0)