From c36353fe73a16a4a17aa58b9457c8c96595451fe Mon Sep 17 00:00:00 2001 From: Timothy Date: Wed, 24 Feb 2016 12:11:56 +0100 Subject: [PATCH 1/2] rename config.socialProviders to config.web.social and callbackUri to uri --- .../EnrichIntegrationFromRemoteConfigStrategy.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/strategy/EnrichIntegrationFromRemoteConfigStrategy.js b/lib/strategy/EnrichIntegrationFromRemoteConfigStrategy.js index 2cf6e5d..fe8b19f 100644 --- a/lib/strategy/EnrichIntegrationFromRemoteConfigStrategy.js +++ b/lib/strategy/EnrichIntegrationFromRemoteConfigStrategy.js @@ -61,8 +61,8 @@ EnrichIntegrationFromRemoteConfigStrategy.prototype._enrichWithSocialProviders = return callback(err); } - if (!config.socialProviders) { - config.socialProviders = {}; + if (!config.web.social) { + config.web.social = {}; } mappings.each(function (mapping, next) { @@ -87,14 +87,14 @@ EnrichIntegrationFromRemoteConfigStrategy.prototype._enrichWithSocialProviders = delete remoteProvider.createdAt; delete remoteProvider.updatedAt; - var localProvider = config.socialProviders[providerId]; + var localProvider = config.web.social[providerId]; if (!localProvider) { - localProvider = config.socialProviders[providerId] = {}; + localProvider = config.web.social[providerId] = {}; } - if (!localProvider.callbackUri) { - localProvider.callbackUri = '/callbacks/' + remoteProvider.providerId; + if (!localProvider.uri) { + localProvider.uri = '/callbacks/' + remoteProvider.providerId; } extend(remoteProvider, { enabled: true }); From e50e5ab7384d1825d295687fa85aacd3ce511028 Mon Sep 17 00:00:00 2001 From: Timothy Date: Wed, 24 Feb 2016 12:56:24 +0100 Subject: [PATCH 2/2] fix failing test --- .../strategy/EnrichIntegrationFromRemoteConfigStrategyTest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/strategy/EnrichIntegrationFromRemoteConfigStrategyTest.js b/test/strategy/EnrichIntegrationFromRemoteConfigStrategyTest.js index a379a2c..13ba877 100644 --- a/test/strategy/EnrichIntegrationFromRemoteConfigStrategyTest.js +++ b/test/strategy/EnrichIntegrationFromRemoteConfigStrategyTest.js @@ -194,7 +194,7 @@ describe('EnrichIntegrationFromRemoteConfigStrategy', function () { }); }); - it('should set the socialProviders property on the configuration', function (done) { + it('should set the web.social property on the configuration', function (done) { var mockOAuthPolicy = {}; var mockAccountStoreMappings = new Collection({ size: 1 }); var mockApplication = makeMockApplication(mockOAuthPolicy, mockAccountStoreMappings); @@ -202,7 +202,7 @@ describe('EnrichIntegrationFromRemoteConfigStrategy', function () { testStrategy.process(mockConfig, function (err, result) { assert.isNull(err); - assert.isDefined(result.socialProviders); + assert.isDefined(result.web.social); done(); }); });