Renames oauth to authDataManager in src
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
var OAuth = require("../src/oauth/OAuth1Client");
|
||||
var OAuth = require("../src/authDataManager/OAuth1Client");
|
||||
var request = require('request');
|
||||
|
||||
describe('OAuth', function() {
|
||||
@@ -138,7 +138,7 @@ describe('OAuth', function() {
|
||||
|
||||
["facebook", "github", "instagram", "google", "linkedin", "meetup", "twitter"].map(function(providerName){
|
||||
it("Should validate structure of "+providerName, (done) => {
|
||||
var provider = require("../src/oauth/"+providerName);
|
||||
var provider = require("../src/authDataManager/"+providerName);
|
||||
jequal(typeof provider.validateAuthData, "function");
|
||||
jequal(typeof provider.validateAppId, "function");
|
||||
jequal(provider.validateAuthData({}, {}).constructor, Promise.prototype.constructor);
|
||||
|
||||
@@ -149,7 +149,7 @@ describe('rest create', () => {
|
||||
|
||||
it('handles no anonymous users config', (done) => {
|
||||
var NoAnnonConfig = Object.assign({}, config);
|
||||
NoAnnonConfig.oauth.setEnableAnonymousUsers(false);
|
||||
NoAnnonConfig.authDataManager.setEnableAnonymousUsers(false);
|
||||
var data1 = {
|
||||
authData: {
|
||||
anonymous: {
|
||||
|
||||
@@ -5,7 +5,7 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 2000;
|
||||
var cache = require('../src/cache').default;
|
||||
var DatabaseAdapter = require('../src/DatabaseAdapter');
|
||||
var express = require('express');
|
||||
var facebook = require('../src/oauth/facebook');
|
||||
var facebook = require('../src/authDataManager/facebook');
|
||||
var ParseServer = require('../src/index').ParseServer;
|
||||
var path = require('path');
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ export class Config {
|
||||
this.pushController = cacheInfo.pushController;
|
||||
this.loggerController = cacheInfo.loggerController;
|
||||
this.userController = cacheInfo.userController;
|
||||
this.oauth = cacheInfo.oauth;
|
||||
this.authDataManager = cacheInfo.authDataManager;
|
||||
this.customPages = cacheInfo.customPages || {};
|
||||
this.mount = mount;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ RestWrite.prototype.handleOAuthAuthData = function(provider) {
|
||||
return;
|
||||
}
|
||||
|
||||
let validateAuthData = this.config.oauth.getValidatorForProvider(provider);
|
||||
let validateAuthData = this.config.authDataManager.getValidatorForProvider(provider);
|
||||
|
||||
if (!validateAuthData) {
|
||||
throw new Parse.Error(Parse.Error.UNSUPPORTED_SERVICE,
|
||||
|
||||
@@ -9,7 +9,7 @@ var batch = require('./batch'),
|
||||
middlewares = require('./middlewares'),
|
||||
multer = require('multer'),
|
||||
Parse = require('parse/node').Parse,
|
||||
oauthManager = require('./oauth');
|
||||
authDataManager = require('./authDataManager');
|
||||
|
||||
//import passwordReset from './passwordReset';
|
||||
import cache from './cache';
|
||||
@@ -165,7 +165,7 @@ function ParseServer({
|
||||
userController: userController,
|
||||
verifyUserEmails: verifyUserEmails,
|
||||
allowClientClassCreation: allowClientClassCreation,
|
||||
oauth: oauthManager(oauth, enableAnonymousUsers),
|
||||
authDataManager: authDataManager(oauth, enableAnonymousUsers),
|
||||
appName: appName,
|
||||
publicServerURL: publicServerURL,
|
||||
customPages: customPages,
|
||||
|
||||
Reference in New Issue
Block a user