-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy path_sfB2CClientIDCreate.js
More file actions
30 lines (26 loc) · 1.04 KB
/
_sfB2CClientIDCreate.js
File metadata and controls
30 lines (26 loc) · 1.04 KB
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
/* eslint-disable max-len */
'use strict';
// Initialize required modules
const sObjectAPIs = require('../../lib/apis/sfdc/sObject');
/**
* @function _sfB2CClientIDCreate
* @description Attempts to create the seed B2CClientID record used by the Salesforce Platform
*
* @param {connection} authConnection Represents the connection that should be used to perform the getQuery
* @param {Object} environmentDef Represents the already-validated environment details to use when performing the actions
* @returns {Promise} Returns the B2CClientID record creation results
*/
module.exports = (authConnection, environmentDef) => {
// Attempt to create the B2C ClientID record
return sObjectAPIs.create(
authConnection,
'B2C_Client_ID__c',
{
Name: environmentDef.b2cClientId,
JWT_Certificate_Name__c: environmentDef.sfCertDeveloperName,
Is_Active__c: true,
Audit_Authentication_API_Interactions__c: true,
B2C_Client_ID_Label__c: 'Default B2C ClientID'
}
);
};